Refresh after HTML Form submit
I know that I can use native form controls but in the interest of speed I am trying to use a plain old html form:
<form onSubmit="javascript:go(this);">
<input type=text name=f1>
etc..
</form>
<script>
function go(frm) {
// do stuff
return false;
}
</script>
This works, but the form gets refreshed afterwards, so you cannot see what you entered. (In a browser the "return false" would prevent refresh.)
a) is this expected?
b) can the refresh be prevented?
Thx Paul
2 Answers
-
Duh! should be onSubmit="return go(this);" - which works :-)
Strange how asking a question helps you solve it yourself..
Paul; -
I think that a php form tutorial can give you some examples