jQuery Ajax表单框

I have a list with several items and want to prevent the user from loading a new page for adding an item to this list.

My question now is how I bind in a window/box. I found a jQuery-plugin "jQuery-ui-dialog" which creates boxes but I am unsure if I use this.

Another difficulty is the validation. Is it possible to use the Symfony2-Validation for Ajax requests?

The jquery-ui dialog is one of a choices to solve this problem (you can as well just leave the normal form and send it via ajax - and it's a slighty easier solution, so I'd recommend you try to implement something like that first).

I did not use symfony ever, but it should be very easy to use its validation subsystem for ajax requests. Just remember, that they are normal requests - POSTs or GETs - that you have to handle yourself.

Those two resources should definitively give you some hints: