- First create you outstanding form
<!-- (...) your marvelous form -->
</form>
- SecondlyAdd normal submit button, but add onclick with line that will set action depend on submission
- For each next submit only what you need to change is action (onclick="diary.action=nameofaction;return true;" for submit button (and name that will be display and other unique setting for you submit button)
draft example:
<form method="POST" name="diary" action="save.html">
<!-- put all form rubbish stuff .... like this 3 lines below. -->
Title <input type="text" id="newseditor"/><br/>
Note<input type="textarea" id="newseditor"/><br/>
Is is true story<input type="checkbox" id="newseditor"/><br/>
<!-- here is important place when you set multiple submit stuff with diffrent actions -->
<input type="submit" value="Save" onclick="diary.action='save.html'; return true;">
<input type="submit" value="Load" onclick="diary.action='load.html'; return true;">
</form>
No comments:
Post a Comment