Auto Submitting Form Problem !!

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • James

    Auto Submitting Form Problem !!

    I have a form with a drop down list..

    When the user selects the value from the list I want it to refresh
    automatically, as if the user has pressed submit...

    I have named the form 'test' and added onchange="test. submit();"
    to the Select field.. as so :

    <select size="1" name="search" onchange="frmte st.submit();">

    In HTML / ASP this works... In PHP it fails...

    Any Ideas ?

    Thanks

  • Brandon Blackmoor

    #2
    Re: Auto Submitting Form Problem !!

    James wrote:[color=blue]
    >
    > I have a form with a drop down list..
    > When the user selects the value from the list I want
    > it to refresh automatically, as if the user has pressed
    > submit...[/color]

    Don't do that. You may think it makes things easier for the user, and
    for some people it might, but for many people you will make the form
    hard to use, and for some people you are going to make it impossible to
    even use your form at all.

    So don't do that.

    However, if you really must, here is the Javascript (not PHP) that does it:



    In the future, please ask JavaScript questions in a JavaScript newsgroup
    (or just do a search -- the link above would have been the very first
    link returned if you had entered "javascript select submit" on Google).

    Comment

    Working...