www.webdeveloper.com
Results 1 to 3 of 3

Thread: script to go to a web site when selected through a drop down list

  1. #1
    Join Date
    Apr 2004
    Location
    alabama
    Posts
    2

    script to go to a web site when selected through a drop down list

    i am having trouble firguring out how i can add a script that will go to a certain web address when it si selected through the drop down list of sites...any suggestions or help would be great.. thanks ser
    see attached for example
    Attached Files Attached Files

  2. #2
    Join Date
    Jun 2003
    Location
    UK
    Posts
    789
    Hi,

    Hope this helps:

    PHP Code:
    <select onchange="window.location=this.value">
    <
    option value="">Select one...
    <
    option value="http://www.google.co.uk">Google
    <option value="http://www.bbc.co.uk">BBC
    <option value="http://www.yahoo.co.uk">Yahoo
    </select
    Make sure you have an alterniative set of links in case the user has javascript disabled.

    Neil
    if($neil=="stuck"){echo("Help!");
    pull_out("hair", $neil);
    $neil=bald;}
    else{echo("What do you want?");}

  3. #3
    Join Date
    Apr 2004
    Location
    alabama
    Posts
    2
    worked great ...thanks neil

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles