I have a slight problem with usage of jquery validation plugin.
It works perfectly with static forms rendered during normal pageload.
The code I use for validation looks something likie this
$('#form_name).validate({ (...) and other stuff
The problem is when I use ajax request to create popup form with the same ID it won’t work.
I couldn’t find proper answer form this issue so I came here. I guess the $().live method could be usefull but I have no idea how to use it on no event like “click”, “submit” etc..
Ow and to prevent other questions the page where new ajax form is loaded is located somwhere else than the page where the static form is rendered so there is no conflicts of two identical forms on the same page.
I have come across this problem before. Newly added ajax content may need the triggers reinitialising. There are several approaches you can take. Below is just one of them.
put the javasciprt bind triggers inside a function and call it after the ajax request.