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 5 of 5
  1. #1
    New Coder
    Join Date
    Jul 2002
    Location
    the Netherlands
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question I need a script to handel links from two combo boxes

    Hello All,

    I'm looking for a script that will do the following:

    I have two combo boxes (in Frame Top)
    1) In box 1 you select a letter from A to Z (index)
    2) In box 2 you select the catagories belong to the selection from box 1 (so the options from box 2 should depent on the selection of box 1)

    e.g. box 1 : M
    box 2 should give me the options: Message, Mistic, Music, ...

    When I make a selection from the second combo box. Then I press a button (picture) and it should do the following

    Opening in Frame Bottom a document with a name from Box 1 and going to the bookmark on that document from Box 2

    Box 1 = M
    Box 2 = Music
    Open in Bottom frame document M.html#Music

    Maybe this is easy, maybe not but thanks in advance.
    Last edited by siflaar; 08-05-2002 at 04:01 PM.
    Greetings,

    Patrick Schouten
    the Netherlands

  • #2
    Regular Coder
    Join Date
    Jul 2002
    Location
    Western US
    Posts
    169
    Thanks
    0
    Thanked 0 Times in 0 Posts
    This has been requested before, but I can't seem to find the thread it was in. I believe that this is what you are looking for, or will at least put you 90% of the way there. http://javascriptkit.com/script/cut183.shtml

    A change to the target of the frame that contains this double combo box will make the requested page apear below. Simply add your bookmarks to each group of links.

    group[0][0]=new Option("Music","http://localhost.com/M.html#Music")


    ShriekForth

  • #3
    New Coder
    Join Date
    Jul 2002
    Location
    the Netherlands
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hello ShriekForth,

    Thanks. I looked at the script but can't see how it is loading the document in the bottom frame.
    Any suggestions to change the script?
    Greetings,

    Patrick Schouten
    the Netherlands

  • #4
    Regular Coder
    Join Date
    Jul 2002
    Location
    Western US
    Posts
    169
    Thanks
    0
    Thanked 0 Times in 0 Posts
    in the source of your top frame you need to add the following html, <base target="mainFrameName">. That will be an easy html fix, or you could reference the bottom frame in the go function.

    Code:
    function go(){
    window.mainFrameName.location=temp.options[temp.selectedIndex].value
    }
    adding the window.Frame reference should also do it with the correct frame name in place.

    ShriekForth

  • #5
    New Coder
    Join Date
    Jul 2002
    Location
    the Netherlands
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks,

    I'll give it a try
    Greetings,

    Patrick Schouten
    the Netherlands


  •  

    Posting Permissions

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