• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 373
  • Last Modified:

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

0
swaggrK
Asked:
swaggrK
  • 7
  • 7
1 Solution
 
Michel PlungjanIT ExpertCommented:
Please load your site in Chrome and press F12

There are literally 100s of errors
0
 
swaggrKAuthor Commented:
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
0
 
Michel PlungjanIT ExpertCommented:
Ok, so what is the issue?
Do you have a page with just the code you want to use?
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
swaggrKAuthor Commented:
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

0
 
Michel PlungjanIT ExpertCommented:
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?
0
 
swaggrKAuthor Commented:
@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

0
 
Michel PlungjanIT ExpertCommented:
So why remove it?
0
 
swaggrKAuthor Commented:
@mplungjan because it is referencing another site. Are you able to assist?
0
 
Michel PlungjanIT ExpertCommented:
Sorry. I suggest you get one of the literally thousands of image scrollers that does not come with someone else's scripts and adverts
0
 
swaggrKAuthor Commented:
Thank you for FINALLY saying that can not help.
0
 
Michel PlungjanIT ExpertCommented:
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
0
 
swaggrKAuthor Commented:
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.
0
 
Michel PlungjanIT ExpertCommented:
0
 
swaggrKAuthor Commented:
Great! That works! Thanks!!!
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 7
  • 7
Tackle projects and never again get stuck behind a technical roadblock.
Join Now