PDA

View Full Version : Featured Content Script Switching Error



swings
10-02-2006, 11:29 AM
1) Script Title:
Featured Content Slider

2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex17/featuredcontentslider.htm

3) Describe problem:
Take a look at my site if you will for a clearer explanation of the problem.
This will be a good url to explain well:

http://www.lijflog.nl/log.php?item=716&read=1

As you can see I have succesfully implemented the Featured Content Slider for the pictures on top of the page. However, succesfully.....
If you scroll down the page you can see thumbs for more pictures in the post. If you click a thumb the top image also changes accordingly. But... when you click a thumb and then click on 'next' under the big picture the script gives an error. Does anybody know a trick or solution to get this working back and forth? Any help would be greatly appreciated!

I have been using DD a couple of years now but I still love it! Thanks for the great scripts guys!

Regards,

Maarten

jscheuer1
10-02-2006, 05:19 PM
I don't read, is that Dutch? Anyways, I don't see the point in even having those two features linked as, on all but the hugest monitors, you would never see the top picture change when clicking on the bottom thumbnails (the page doesn't reload to the top in Opera or Fire Fox, I haven't tested it in IE). However, an easy solution would be to just get rid of the 'next' button. It doesn't work at all in Opera anyway. Add to this line in contentslider.js (red):


pcontent+='<a href="#" style="font-weight: bold;display:none;" onClick=\"ContentSlider.turnpage(\''+sliderid+'\', parseInt(this.getAttribute(\'rel\'))); return false\">Next</a>'

swings
10-02-2006, 05:52 PM
Thanks for your reaction!!

Yeah, it is Dutch. In Internet Explorer the page doesn't go to top either. I'm still working on that. However, I find the 'next' button very useful, so I want to keep that one. So the ideal situation would be: clicking on a thumb would switch the picture on top and go to the top op the page using an anchor link. That means that the value for the next button has to change accordingly otherwise it will return an error. And that doesn't work up until now...

Anyone?

Regards.

jscheuer1
10-02-2006, 06:03 PM
Ok, I played with this one a bit more. The problem with the next button in Opera is the layout, not function. Use this for the pagination division:


<div class="pagination" id="paginate-slider716" style="white-space:nowrap;overflow:visible;width:101%!important;width:auto;margin-left:-2px!important;margin-left:0;"></div>

To fix the other part, change your links with the thumbnails to be like these:


<a href="#" onClick="ContentSlider.turnpage('slider716', 0);window.scrollTo(0, 0); return false;">


<a href="#" onClick="ContentSlider.turnpage('slider716', 2);window.scrollTo(0, 0); return false;">

The important part is that the number (red in the below) must not be quoted:


<a href="#" onClick="ContentSlider.turnpage('slider716', 2);window.scrollTo(0, 0); return false;">

swings
10-02-2006, 06:22 PM
Oh my God. It does the trick!! Thank you very much.