User Tools

Site Tools


info:javascript:autosubmit
Please note, that this is an old archived version of this site. Check out the new version at andunix.net!

Automatic Submission of a Form if an Element is changed

To submit the form if an element changes, you can use

onChange="this.form.submit()"

Example

<form action="index.jsp" method="post">
  <select onChange="this.form.submit()">
    <option>please select a value</option>
    <option value="1">one</option>
    <option value="2">two</option>
    <option value="3">three</option>
  </select>
</form>
info/javascript/autosubmit.txt · Last modified: 2013-03-14 08:22 by andunix