Hi all,

Im currently developing my first site making extensive use of AJAX. I'm not making use of any framework on this project (or any design patterns) as its just a small project and I was hoping to get more of a feel for the AJAX process more than anything really.

My question is really what is the most effective/efficient way to organise the process of the form, form submition and confirmation/error display. Below are my goals;

1) Forms can be submitted via AJAX but also without JS enabled
2) Detailed Error reporting is given with and without JS
3) I would like to use the same form to handle both AJAX and non AJAX submissions (i.e. same validation functions etc)
4) I would like to make use of the redirect function so as to avoid the 'double post' problem

My current idea is comprised of a form1.php, form1_ajax.js, form1_handler.php and a confirmation.php.

I was just wondering what peoples best plan of attack would be to meet such criteria, and any pitfalls I should be aware of.

Many thanks indeed

/Matt