Hi Karl and Jake, Thank you for those super quick replies, sensational!
Jake I did try yours after reading your reply, but it wasn't working. The find("form") was still 'finding' the original form...not the ajax loaded one. This was actually my main problem, because the new form (from the ajax request) wasn't in the loaded DOM I couldn't do: $("#frm").submit(function(){ //validation code here }); I ended up using a generic method for all form posts (from forms generated by a full page load and by ajax), then having onsubmit="return doValidateForm();" in my form tag. Karl that link you posted helped me with the loading of my error message: $("fieldset").children("#id_errors").html(err); Lovely! Thanks again, M On May 17, 12:05 am, Karl Swedberg <[EMAIL PROTECTED]> wrote: > Hi Michael, > > I think this tutorial will help you solve the problem: > > http://docs.jquery.com/Tutorials:AJAX_and_Events > > --Karl > _________________ > Karl Swedbergwww.englishrules.comwww.learningjquery.com > > On May 16, 2007, at 9:49 AM, Michael Sharman wrote: > > > > > Hi Jake, > > > There is a version here:http://www.21goals.com/demo/ > > > Basically when you submit the 'Add Goal' page (when it's empty) you > > get jquery validation. > > > If I then click the 'login' link from the header the login page is > > loaded via Ajax. It is this page which I want to validate exactly like > > the first form. > > > Michael > > > On May 16, 11:26 pm, "Jake McGraw" <[EMAIL PROTECTED]> wrote: > >> Mike: > > >> Do you have a live example? > > >> - jake > > >> On 5/16/07, Michael Sharman <[EMAIL PROTECTED]> wrote: > > >>> Hi guys, > > >>> I have a page which contains javascript validation for an existing > >>> form. There is also a link where another form can be loaded onto the > >>> page via ajax, this step is working fine. > > >>> My problem is that the validation/submission code in the page header > >>> isn't picking up my *new* form (from the ajax request) as the new > >>> form > >>> fields aren't in the DOM. > > >>> Is this something anyone has come across before and has a solution > >>> for? > > >>> Thanks