Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Jun 2006
    Location
    New York
    Posts
    32
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Help editing a script

    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

    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!

  • #2
    Regular Coder
    Join Date
    Jan 2003
    Posts
    867
    Thanks
    4
    Thanked 8 Times in 8 Posts
    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

    Code:
    // ***** 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:
    Code:
    function InitScripts(){
     zxcScrollStop('Scroll1',ContentAry,120,20,10,'MainImg1','MainTxt1','IFrame1');
    }
    To switch the buttons to images remove this:

    Code:
      <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:
    Code:
      <img src="leftarrow.gif" onclick="zxcScrollStepCng('Scroll1',-1,true)"> 
      <img src="righttarrow.gif" onclick="zxcScrollStepCng('Scroll1',1)">

  • #3
    New Coder
    Join Date
    Jun 2006
    Location
    New York
    Posts
    32
    Thanks
    1
    Thanked 0 Times in 0 Posts

    You're right

    Thanks. You're right, he did a terrific job of annotating. I'm just a little slow


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •