#1
  1. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2001
    Location
    Heemskerk, The Netherlands
    Posts
    254
    Rep Power
    13

    getting value from url in javascript.


    I'm building something where you have some pulldown boxes which depend on each other, in box 1 you can select a-z. When selected, box2 pops with the choice of box 1 and another a-z choice. ie, when you choose D in box 1, you get box 2 with D + a-z choice. But now comes my problem, when box 2 is on the screen then box is autoselected to the previous choice [D] [DA] .... when you choose something in box 2 it should change the url once more and popup a third box with the client names starting with the letters in box2.

    When I choose something in box2 , the choice in box 1 is lost. Here's my code.

    Code:
    <script language='JavaScript'><!--
    function GoToSub1() {
    	location=("./AddKlantContact.php?View=Input&Href1=" + document.AddKlantContact.Href1.options[document.AddKlantContact.Href1.selectedIndex].value);
    }
    
    function GoToSub2() {
    	location=("./AddKlantContact.php?View=Input&Href1=" + document.AddKlantContact.Href1.options[document.AddKlantContact.Href1.selectedIndex].value + "&Href2=" + document.AddKlantContact.Href2.options[document.AddKlantContact.Href2.selectedIndex].value);
    }
    //-->
    The choices should be interactive, when you make a wrong choice in any of the boxes you should be able to select another choice in any of the boxes.

    Marc van Duivenvoorde.
  2. #2
  3. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2001
    Location
    Heemskerk, The Netherlands
    Posts
    254
    Rep Power
    13
    sorry, forgot to mention, now I get the Href1 from the form in GoToSub2, but I want to extraxt it from the url.

    Marc van Duivenvoorde
  4. #3
  5. Is a Psycho
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2000
    Location
    In your computer
    Posts
    231
    Rep Power
    14
    heya...

    Take a look at the following tutorial:

    http://www.wsabstract.com/javatutors/send1.shtml

    Hope it helps...
    deepspring

    - "Netscape 4 users are like lemmings... You can't help but laugh when one falls off a cliff"

IMN logo majestic logo threadwatch logo seochat tools logo