Hi to all,
I've read many post about inserting javascript code in the pages. More I read
more confused I get.
In an normal html code page, this code works fine if inserted between the right tag.
when I tried to copy it in the product page, the brouser ie reports an error.
this is the code... is a slideshow:
This is the HTML code for the sliding picturesCode:<SCRIPT LANGUAGE="JavaScript"> <!-- Begin var rotate_delay = 3000; // delay in milliseconds (5000 = 5 secs) current = 0; function next() { if (document.slideform.slide[current+1]) { document.images.show.src = document.slideform.slide[current+1].value; document.slideform.slide.selectedIndex = ++current; } else first(); } function previous() { if (current-1 >= 0) { document.images.show.src = document.slideform.slide[current-1].value; document.slideform.slide.selectedIndex = --current; } else last(); } function first() { current = 0; document.images.show.src = document.slideform.slide[0].value; document.slideform.slide.selectedIndex = 0; } function last() { current = document.slideform.slide.length-1; document.images.show.src = document.slideform.slide[current].value; document.slideform.slide.selectedIndex = current; } function ap(text) { document.slideform.slidebutton.value = (text == "Stop") ? "AutoPlay" : "Stop"; rotate(); } function change() { current = document.slideform.slide.selectedIndex; document.images.show.src = document.slideform.slide[current].value; } function rotate() { if (document.slideform.slidebutton.value == "Stop") { current = (current == document.slideform.slide.length-1) ? 0 : current+1; document.images.show.src = document.slideform.slide[current].value; document.slideform.slide.selectedIndex = current; window.setTimeout("rotate()", rotate_delay); } } // End --> </script>
Can you please help me to find a solution?Code:</head> <!-- CONTENT TABLE --> <TABLE cellpadding=0 cellspacing=0 border=0 width="100%" height="100%"><tr><td ALIGN=center VALIGN=center> <form name=slideform> <!-- EDIT THIS AREA TO ADD AND REMOVE PICTURES FROM THE SLIDESHOW --> <input type=hidden value="cart/images/Fgallery1-1.jpg" name="slide" onChange="change();"> <input type=hidden value="cart/images/Fgallery1-2.jpg" name="slide" onChange="change();"> <table width="232" height="174" border="0" cellpadding="1" cellspacing="0"> <tr> <td align=center height="30"> <span class="slideshowtitle">ZENCART</span> </td> </tr><tr><td align="center" bgcolor="C0C0C0" height="150"> <!-- THE NEXT LINE IS THE STARTING PICTURE --> <img src="/cart/images/Fgallery1-1.jpg" name="show"><br> </td></tr><tr><td align=center height="50"><input type=button name="slidebutton" onClick="ap(this.value);" value="AutoPlay" title="AutoPlay" class="button-popups" onMouseOver="this.className='buttonon-popups'" onMouseOut="this.className='button-popups'"></td> </tr> </table> </form> </td></tr></table>
Thanks to all
Maxiva
Zencart 1.38a
THE BEST



