PDA

View Full Version : Custom Buttons for Slideshow



Bornfree
11-17-2006, 03:24 AM
1) Script Title: Interactive slideshow

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex14/interslide.htm

3) Describe problem: Hi Guys, This place is so cool.

Can someone please tell me to to get your custom buttons for Play and Stop???
I have got it for next and prev. What i want is for a"Stop" button to appear when it's playing and a "Play" button to appear when the slideshow is stopped.(With the text written ofcourse).

Thansk guys. You all are great

djr33
11-17-2006, 03:34 AM
First, the easy answer is to use CSS to style the buttons to look cooler. You could possibly to images, but that would be a bit harder, since javascript is so convenient for buttons.

<input type="button" ... value="Play" onClick="if (this.value == 'Play') this.value = 'Stop'; else this.value = 'Play';">
I *think* that syntax is correct.

Using that onclick command will make it switch to the other thing.. if it's set to play, then say stop, etc. Setting the original value as "play" should match since it starts playing and can go from there.

If you need to actually CHANGE the button there, it's possible, but complex.

At the moment, it's just one button that does stuff. If you did two buttons, you'd need to switch visibility between them and/or replace it each time with javascript. It's more complex.

Hope this helps.

Bornfree
11-17-2006, 03:54 AM
Thanks DJR for such a quick response.