View Full Version : Help editing a script

06-06-2006, 04:42 AM
Vic was kind enough to help me with a scrolling product image script. The result looks like this:


You can see a working model at the URL below. I was able to edit the script so that if you click on a product picture in the scroll bar it loads (iframe) an html page with a larger product pic and other links and data (thanks Vic!). But I need to modify a few things that I just can't seem to accomplish. Details of the mods I need are at the link below.

See it here (http://www.mrbreeze.com/enex/scrolldouble.html)

P.S., I also need to speed up the scroll but can't figure THAT out either <sigh>. Any help would be greatly appreciated. I'm already late finishing this and I'm gonna get a beating in the morning!

06-06-2006, 06:42 AM
Here's a couple quick fixes.

To change the speed of the scrolling, it appears someone (Vic?) documented the code well and included the scroll speed as an option

// ***** Initialisation
// Each application must be initialised from a <BODY> or window onload event
// e.g.
// <body onload="zxcScrollStop('Scroll1',ContentAry,120,40,10,'MainImg1','MainTxt1');">
// where:
// parameter 0 = the unique ID name of the Scroll <DIV>. (string)
// parameter 1 = the array containing the image data. (array variable)
// parameter 2 = the width of each scroll element. (digits)
// parameter 3 = the separation between each scroll element. (digits)
// parameter 4 = the scroll speed(milliSec). (digits)
// parameter 5 = the unique ID name of the Main Image Element. (string - optional)
// parameter 6 = the unique ID name of the Main Image Text Anchor Element. (string - optional)
// parameter 7 = the unique ID name of the IFrame Element. (string - optional)

So you would want to update this function:

function InitScripts(){

To switch the buttons to images remove this:

<INPUT class=TxtArea style="Z-INDEX: 2; WIDTH: 80px; POSITION: relative; TOP: 5px" onclick="zxcScrollStepCng('Scroll1',-1,true)" type=button value=Left name="">
<INPUT class=TxtArea style="Z-INDEX: 2; WIDTH: 80px; POSITION: relative; TOP: 5px" onclick="zxcScrollStepCng('Scroll1',1)" img="images/buttonright.gif" type=button value=Right name="">

And add this:

<img src="leftarrow.gif" onclick="zxcScrollStepCng('Scroll1',-1,true)">
<img src="righttarrow.gif" onclick="zxcScrollStepCng('Scroll1',1)">

06-06-2006, 08:24 AM
Thanks. You're right, he did a terrific job of annotating. I'm just a little slow :rolleyes: