Results 1 to 5 of 5

Thread: Scrollable Menu Links - mulitple menus

  1. #1
    Join Date
    Aug 2008
    Posts
    13
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default Scrollable Menu Links - mulitple menus

    1) Script Title: Scrollable Menu Links

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...ollerlink.htm#

    3) Describe problem: I wish to use this script on different pages of a site with a different menu list. Is it a case that i will have to use the same script with a different name and change the menu list accordingly (so i have a different script for each page), or is there a way this script can be modified so that i can use the one script for the different menu items.

    hope the above makes sense.

    thanks

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,496
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    I'm assuming you mean because you intend to use this as an external script file. Since the links and other configuration variables:

    Code:
    //configure path for left and right arrows
    var goleftimage='pointer2.gif'
    var gorightimage='pointer.gif'
    //configure menu width (in px):
    var menuwidth=300
    //configure menu height (in px):
    var menuheight=25
    //Specify scroll buttons directions ("normal" or "reverse"):
    var scrolldir="normal"
    //configure scroll speed (1-10), where larger is faster
    var scrollspeed=6
    //specify menu content
    var menucontents='<nobr><a href="http://www.dynamicdrive.com">Dynamic Drive</a> | <a href="http://www.javascriptkit.com">JavaScript Kit</a> | <a href="http://www.codingforums.com">CodingForums.com</a> | <a href="http://www.builder.com">Builder.com</a> | <a href="http://freewarejava.com">Freewarejava.com</a></nobr>'
    are globals, you could just omit one or more of them from the script. Then link the script to as many pages as you like, just define the omitted values on (or linked externally to) those pages before the external script tag for the main script.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Aug 2008
    Posts
    13
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    ok you lost me a little - new to this, yes i am using it as an external script

    do you mean i could take the "var menucontents" out of the main script altogether and put into another file call it blah.js and link this whilst also linking the main script. At the moment i call the main script like below where i want the menu to appear. How would i call the script that just contained the global variable - if that is what you meant?

    <script type="text/javascript" src="script/menu.js">
    /***********************************************
    * Scrollable Menu Links- Dynamic Drive DHTML code library (www.dynamicdrive.com)
    * Visit http://www.dynamicDrive.com for hundreds of DHTML scripts
    * This notice must stay intact for legal use
    ***********************************************/
    </script>

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,496
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Yes, that's essentially what I meant, you could do it this way:

    Code:
    <script type="text/javascript" src="script/blah.js"></script>
    <script type="text/javascript" src="script/menu.js">
    /***********************************************
    * Scrollable Menu Links-  Dynamic Drive DHTML code library (www.dynamicdrive.com)
    * Visit http://www.dynamicDrive.com for hundreds of DHTML scripts
    * This notice must stay intact for legal use
    ***********************************************/
    </script>
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. #5
    Join Date
    Aug 2008
    Posts
    13
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    brilliant - thank you so much, and for such a quick response

    nikki

Bookmarks

Posting Permissions

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