Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 6 of 6

Thread: drop and jump

  1. #1
    Senior Member kirman's Avatar
    Join Date
    May 2003
    Location
    UK England
    Posts
    765
    Member #
    1499
    Liked
    2 times
    how do i make this link to these pages

    Code:
                <form name="form1" method="post" action="">
                  <select name="select">
                    <option value="web.html">Web Design</option>
                    <option value="gra.html">Graphics Design</option>
                    <option value="host.html">Hosting</option>
                    <option value="dom.html">Domain Names</option>
                  </select>
                  <input name="jump" type="submit" id="jump" value="Go">
                </form>
    i've done it ebfore i've just lost the code and forgetten it lol

    thnx
    Dream like you'll live forever. Live like you're gonna die 2morrow!

  2.  

  3. #2
    Senior Member justlivyalife's Avatar
    Join Date
    Jul 2003
    Location
    Birmingham, UK
    Posts
    2,871
    Member #
    2374
    Code:
    <form name="mynavbar">
    <p><select name="example" size="1">
    <option value="http://www.cnet.com">choice1</option>
    <option value="http://www.cnn.com">choice2</option>
    <option value="http://www.geocities.com">choice3</option>
    </select></p>
    
    <script language="javascript">
    <!--
    function go()
    {
    location=document.mynavbar.example.
    options[document.mynavbar.example.selectedIndex].value
    }
    //-->
    </script>
    
    <input type="button" name="test" value="Go!" onClick="go()">
    </form>
    Is what you are looking for I believe.
    from www.javascriptkit.com
    justlivyalife - The future depends on what we do in the present. (Mahatma Gandhi)
    WDF Resources: WDF Rules
    Non-WDF: JavascriptSource | Dynamic Drive | phpBB | HTML-Kit | Winamp | Download Firefox | Morguefile

  4. #3
    Senior Member kirman's Avatar
    Join Date
    May 2003
    Location
    UK England
    Posts
    765
    Member #
    1499
    Liked
    2 times
    indeed it is my good friend
    Dream like you'll live forever. Live like you're gonna die 2morrow!

  5. #4
    Senior Member kirman's Avatar
    Join Date
    May 2003
    Location
    UK England
    Posts
    765
    Member #
    1499
    Liked
    2 times
    i need one thats free and not off a site the any 1 care to create me one
    Dream like you'll live forever. Live like you're gonna die 2morrow!

  6. #5
    Senior Member justlivyalife's Avatar
    Join Date
    Jul 2003
    Location
    Birmingham, UK
    Posts
    2,871
    Member #
    2374
    Someone on this forum must be a JavaScript expert!
    I remember who it is now - Skrlin
    justlivyalife - The future depends on what we do in the present. (Mahatma Gandhi)
    WDF Resources: WDF Rules
    Non-WDF: JavascriptSource | Dynamic Drive | phpBB | HTML-Kit | Winamp | Download Firefox | Morguefile

  7. #6
    Senior Member skrlin's Avatar
    Join Date
    Apr 2003
    Location
    Illinois
    Posts
    562
    Member #
    1063
    You will want to use the location.href attribute, location is the object and href is where the url value is actually stored

    EX:
    [code]
    location.href=document.mynavbar.example.
    options[document.mynavbar.example.selectedIndex].value
    - Brian


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 10:56 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2020 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com