#1
  1. No Profile Picture
    tucats
    Guest
    Devshed Newbie (0 - 499 posts)
    is there anyway to submit a form by clicking on an option in a drop down select menu... instead of clicking a submit button...?
  2. #2
  3. No Profile Picture
    falcon
    Guest
    Devshed Newbie (0 - 499 posts)
    I am not sure whether you will be able to submit a form but here is a link to a page which has some code links to another page from a select menu.

    Perhaps with a little imagination you could add some code which will submit the form.

    Hope it helps..

    Falcon.
  4. #3
  5. No Profile Picture
    falcon
    Guest
    Devshed Newbie (0 - 499 posts)
    Doh!

    Sorry forgot the link, here it is..

    http://www.webdeveloper.com/library/qanda.html#dropdown

    Falcon.
  6. #4
  7. No Profile Picture
    PAV
    Guest
    Devshed Newbie (0 - 499 posts)
    Yes you can, but only in IE4+ and NS3+ with the following JS-event

    <SCRIPT LANGUAGE="JavaScript">
    function getURL(form) {
    // get the value of the selected option
    var url = form.selURL.options[form.selURL.selectedIndex].value;
    // go there
    location.href = url;
    </SCRIPT>
    <FORM>
    <SELECT NAME=selURL onChange="getURL(this.form);">
    <OPTION VALUE="someURL">blah
    <OPTION VALUE="otherURL">blahblah
    </SELECT>
    </FORM>

    But to be sure everyone with older browsers can use it add a button (with other javascript you can hide it from showing in newer browsers, though)

    Peter

Similar Threads

  1. Order to display links
    By sweetpotatoe in forum PHP Development
    Replies: 14
    Last Post: December 7th, 2003, 11:23 PM
  2. Creating an Image gallery
    By cmccomas in forum PHP Development
    Replies: 6
    Last Post: June 16th, 2003, 04:20 AM
  3. MySQL compilation error
    By dman in forum MySQL Help
    Replies: 0
    Last Post: March 15th, 2001, 04:03 PM
  4. php cant get it running
    By wheels in forum PHP Development
    Replies: 2
    Last Post: July 24th, 2000, 04:21 PM
  5. links "input type = select"
    By tucats in forum PHP Development
    Replies: 1
    Last Post: December 14th, 1999, 08:07 AM

IMN logo majestic logo threadwatch logo seochat tools logo