Let there be a search form with quite many of the input fields. The user may either click:
- [Search] and GET the list of the results,
- [Save search criteria] for future use and POST the form content to be stored on server (I'm not interested in storing locally in cookies or so).
How do I achieve that? I've only found solutions to make two types of POST request on two separate buttons.
Maybe a JavaScript onclick function to set <form method="??">
right before its submitted? Would that work?
In HTML5, the
<input>
element got some new attributesThe same attributes are valid for
<button>
Function changeMethod in jquery