When creating a HTML form make sure that the "form" element "onSubmit" attribute is set to a JavaScript function that returns false.
<form >
<input >
<input value="Update">
<>
You can also submit data by associating a function with a form button in a similar way.
<form >
<input >
<input onClick="doAJAXSubmit()" value="Update">
<>
Note that the form "onSubmit" attribute is still set. If the user hits
the enter key in the text field the form will be submitted so you still
need to handle that case.
When updating the page it is recommend you
wait to make sure that the AJAX update of the form data was successful
before updating the data in the page. Otherwise, the data may not
properly update and the user may not know. I like to provide an
informative message when doing a partial update and upon a successful
AJAX interaction I will then update the page.
Your place is valueble for me. Thanks!… http://hellowh983mm.com | |
Reviewed By : , Date : 13-02-2018, Rated : |