View Full Version : Modifying smart cache slideshow help?
Soren
05-31-2004, 07:19 AM
Howdy Doody...
Just run into a bit of a problem.. (for the last few days)
Im trying to insert gif images instead of a standard button on a slideshow script from DHTML Shock... When I replace the buttons with images, it disrupts some of the other code in the file which I dont know how to fix.. Some sort of button disabling feature... Any suggestions? Help would be very much appreciated!
http://www.dhtmlshock.com/slide-shows/SmartCache/
petervazed
05-31-2004, 08:28 AM
Have you changed the type?
input type="button"
to
input type="image"
Read:
http://www.google.nl/search?q=cache:z-SoZMJBaHAJ:tech.irt.org/articles/js185/+%22input+type%3D%22image%22+%22++text&hl=nl
:cool:
Soren
06-01-2004, 01:22 AM
Hi Peter!
Thanks so much for your tip!
Ive almost have it functioning... I have changed the
<input type="button"
to
<input type="image"
Which does seem to help, however I still seem to be having a problem with this change affecting the header script. The problem still has something to do with the button disabling feature... If I remove the .disable script then my image does scroll as intended, but it also reloads the original straight away... So effectively it only works for a split second!
??? Whew... Have I confused the issue?
Cheers,
Soren
kevin
06-01-2004, 03:07 AM
I believe when you use:
input type="image"
the name attribute of the tag no longer applies, so name="previous" and name="next" may not be getting into the javascript. I will transfer this thread to the client side forum since this is a javascript question, hopefully one of the javascript gurus can let you know what you need to do to get it working with image buttons.
Soren
06-01-2004, 04:06 AM
Thanks for placing this where the right people may see it..... Im still struggling with this issue.... So if there are any switched on javascript people who could help resolve this I would be most grateful!
Thanks in advance..
Soren
agent002
06-01-2004, 02:28 PM
Hello Soren,
change this:
document.Slideshow.Previous.disabled = (NextSlide == 0);
document.Slideshow.Next.disabled = (NextSlide == (Slides.length-1));
to:
document.getElementById('Previous').disabled = (NextSlide == 0);
document.getElementById('Next').disabled = (NextSlide == (Slides.length-1));
and in the buttons that you have changed to image inputs, change name="Previous" and name="Next" to id="Previous" and id="Next".
Soren
06-01-2004, 07:06 PM
...... Thank you so much.......
.........Sensational!..........
kevin
06-01-2004, 11:54 PM
on behalf of petervazed, agent002, and myself....
you're welcome :)
vBulletin® v3.6.7, Copyright ©2000-2009, Jelsoft Enterprises Ltd.