seldon
1 Dec 2006, 5:48 AM
Ok, I have short question on how to implement the following.
I have a dialog with a form, and the dialog has a submit button (and a cancel button). Now what i want is this. When the user presses the submit button, the form should be sumitted using ajax. This form submission is then handled server side by my script.
Now I would like to have the following behaviour. I'd like to have a callback function by which I can figure out whether the form submission was succesfull, ie. did the user enter all compulory fields or did he enter a correct email address etc. If the callback informs me that the form submission was succesfull in that sense, i want the dialog to close. Else i want to display some warning telling the user to modify the form contents and I want to be able to update the form contents (include red error messages for example).
How to do this?
Thanks already,
Seldon
I have a dialog with a form, and the dialog has a submit button (and a cancel button). Now what i want is this. When the user presses the submit button, the form should be sumitted using ajax. This form submission is then handled server side by my script.
Now I would like to have the following behaviour. I'd like to have a callback function by which I can figure out whether the form submission was succesfull, ie. did the user enter all compulory fields or did he enter a correct email address etc. If the callback informs me that the form submission was succesfull in that sense, i want the dialog to close. Else i want to display some warning telling the user to modify the form contents and I want to be able to update the form contents (include red error messages for example).
How to do this?
Thanks already,
Seldon