It work well in chrome and IE but for some reason Firefox still sends the emails even though the php prompts the user to complete all required fields.
I am wanting to use ajax as a real time solution to making sure all fields are entered.
The validation script returns XML data which is then processed and applied to the form to provide feedback to the user.
The drawback is that Ajax works only in the most recent browsers, and requires that Java Script (and sometimes Active X as well) be enabled.
Another problem is that unless you put a lot of effort into building a complex framework you could end up with three sets of code: one for client-side validation, one for Ajax validation and one for server-side validation which is always necessary in any case.
The to the input box ('email'), to the associated checkbox ('valid_email) and to the DIV where the feedback text is to appear ('rsp_email').
These elements can then be referenced in the XML file that is returned by the Ajax call.