User Tools

Site Tools


info:javascript:autosubmit

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 09:22 by andunix