But you still have to cater for (or choose to exclude) non-compatible browsers. I have looked all over the web to find a great script already made to download- but your tutorial is very close to what is have been looking for- Thanks for taking the time to explain- I see that you are using it also for your comment/feedback box..
The first is an HTML file containing the FORM which needs to be validated, and some Java Script which can be called from different fields in the form using event handlers (e.g. The Java Script code then passes data to the second file which is your validation script.
If you want to do a calculation that can only be done server-side (eg.
checking that a username is unique in your database) or you want to update the DOM with data from another script or site then Ajax is the perfect tool.
When all fields have been validated the form will be able to be submitted.
Samples of the XML files returned in each case can be found below.As the form is completed, the values are passed immediately to the server as POST variables, the server calculates a result, passing back an XML file which is then parsed to trigger various actions on the page as you will see.