When creating a form make sure that the "form" element "onSubmit" attribute is set to a JavaScript function that returns false.
on form tag
onSubmit="doAJAXSubmit();return false;"
input type="text" id="tf1"
input type="submit" id="submit1" value="Update" >
You can also submit data by associating a function with a form button in a similar way.
on form tag