Advanced HTML Form Design Help

Discussion in 'HTML & Website Design' started by geej, Aug 6, 2007.

  1. #1
    I have a personal portal, which I've added the following searches to.

    Google
    Youtube
    IMDB
    Wikipedia
    ProjectPlaylist
    Seeqpod
    Flickr
    PirateBay

    I presently have separate forms for each search, with their own text boxes and search buttons.

    I want to consolidate all these to just one text entry box. Then have a drop down men, which will allow me to select which search engine I want to use. This will in turn will need to change the action for the form.

    So when I hit enter the form searches the correct site.

    I've check the Internet and haven't been able to find any info on being able to do this.

    If you know of a way to do this, please let me know.
     
    geej, Aug 6, 2007 IP
  2. krt

    krt Well-Known Member

    Messages:
    829
    Likes Received:
    38
    Best Answers:
    0
    Trophy Points:
    120
    #2
    <select onchange="this.form.action = this.options[this.selectedIndex].value">
    <option value="http://google.com/search">Google</option>
    ...
    Code (markup):
    You may need to do more than this though, e.g. dynamically selecting GET/POST method or textbox field name.
     
    krt, Aug 6, 2007 IP