Link to home
Start Free TrialLog in
Avatar of swaggrK
swaggrK

asked on

Image rotator not working

I really want to use the following rotator but whenever I remove the following lines it stops working. I've tried editing the javascript by removing "feature_ad_holder" and/or "adContainer" but it stops working when I do that as well.



<div class="feature_ad_holder" id="feature_ad_holder_1">
	<div class="adContainer" data-height="480" data-width="853" data-keywords=""></div>
</div>
<div class="feature_ad_holder" id="feature_ad_holder_2">
	<div class="adContainer" data-height="481" data-width="853" data-keywords=""></div>
</div>

Open in new window



http://swaggr.com/p/index.html

Open in new window



http://swaggr.com/p/script/all.1347397954.68.js

Open in new window

Avatar of Michel Plungjan
Michel Plungjan
Flag of Denmark image

Please load your site in Chrome and press F12

There are literally 100s of errors
Avatar of swaggrK
swaggrK

ASKER

Thanks mplungjan

I am really just trying to mimic the image slider on the following page
without the advert data.  Here it is working with no errors.

http://swaggr.com/p/working.html


Thanks
Ok, so what is the issue?
Do you have a page with just the code you want to use?
Avatar of swaggrK

ASKER

The problem is that an adver is loaded into the slider(rotator) randombly.
When I remove the code that loads the ads, the image slider(rotator) stops
working completely and merely loads the holder image.


Yes, here is a page with just the code.

http://swaggr.com/p/xx.html

Open in new window




Script that loads adverts:
<script type="text/javascript">

    document.isHomePage = false;
    document.g_sDartZone = 'home';
    g_sCDN = 'http://media.vogue.com';
    _xAdRefresh.adContent = "<div class=\"adParent\"> <iframe scrolling=\"no\" width=\"*adWidth*\" height=\"*adHeight*\" frameborder=\"0\" src=\"http://ad.doubleclick.net/adi/vogue.dart/home;kw=is_bb;*keywords*tile=*adLength*;sz=*adWidth*x*adHeight*;ord=*adOrder*?\"></iframe> <div class=\"adNoScript\" style=\"display:none;\"> <img src=\"http://s0.2mdn.net/viewad/817-grey.gif\" border=\"0\" width=\"*adWidth*\" height=\"*adHeight*\" alt=\"Click Here\"> </div> </div>";
	</script>

Open in new window


When advert codes is removed this is the default image that loads.
    <div class='hero-pre-image'><img src='http://www.swaggr.com/p/files/filecheck/2012/09/11/img-tory-burch-spring-2013_194559942685.jpg_hero_slide.jpg' alt='' />
	</div>   

Open in new window


<script type="text/javascript" src="script/all.js"></script>
http://swaggr.com/p/script/all.js

Open in new window

I am very sorry I do not have a clue what you are asking

http://swaggr.com/p/xx.html

seems to work just fine.

What is the expected behaviour?
Avatar of swaggrK

ASKER

@mplungjan the issue is the following piece of code. If it is removed, the image slider stops working.



<script type="text/javascript">

    document.isHomePage = false;
    document.g_sDartZone = 'home';
    g_sCDN = 'http://media.vogue.com';
    _xAdRefresh.adContent = "<div class=\"adParent\"> <iframe scrolling=\"no\" width=\"*adWidth*\" height=\"*adHeight*\" frameborder=\"0\" src=\"http://ad.doubleclick.net/adi/vogue.dart/home;kw=is_bb;*keywords*tile=*adLength*;sz=*adWidth*x*adHeight*;ord=*adOrder*?\"></iframe> <div class=\"adNoScript\" style=\"display:none;\"> <img src=\"http://s0.2mdn.net/viewad/817-grey.gif\" border=\"0\" width=\"*adWidth*\" height=\"*adHeight*\" alt=\"Click Here\"> </div> </div>";
	</script>

Open in new window




Relating javascript:

http://swaggr.com/p/script/all.js

Open in new window

So why remove it?
Avatar of swaggrK

ASKER

@mplungjan because it is referencing another site. Are you able to assist?
Sorry. I suggest you get one of the literally thousands of image scrollers that does not come with someone else's scripts and adverts
Avatar of swaggrK

ASKER

Thank you for FINALLY saying that can not help.
I apologise - I kept hoping you could explain it in such a way that I could understand.
If the code is from someone's website, then you are vastly better off getting your own set up from scratch
Avatar of swaggrK

ASKER

Yes, completely understandable but my client really liked the way that rotator functioned and I searched everywhere but could not find it. So, I was trying to reverse engineer it.
ASKER CERTIFIED SOLUTION
Avatar of Michel Plungjan
Michel Plungjan
Flag of Denmark image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of swaggrK

ASKER

Great! That works! Thanks!!!