Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

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

— asked March 22nd 2010 by Paul Tanner
  • android
  • form
  • submit
0 Comments

2 Answers

  • Duh! should be onSubmit="return go(this);" - which works :-)
    Strange how asking a question helps you solve it yourself..
    Paul;

    — answered March 22nd 2010 by Paul Tanner
    permalink
    0 Comments
  • I think that a php form tutorial can give you some examples

    — answered June 28th 2010 by Sergey Mr
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.