AJAX Form submit without refresh.
Posted on 2007-07-23
I have a small form which a user will sit in front of for an hour or so, entering some data from faxes. The form contains several selections which take a while to determine.
I want to be able to submit the form via AJAX and not have a refresh which will then need to go and get all the select data again. Yeah, I could cache it, but I'd rather have the form on the screen, the user enters the data and presses "submit" and they're told "OK" or "something went wrong" sort of thing. If it is OK, then the form is cleared and ready for the next lot of data and the fax is put into 1 pile. If something went wrong it goes into another pile.
The code is intranet only.
I'm using prototype.js V126.96.36.199
How do I submit a form via AJAX, and NOT have the form refresh?