Page 1 of 1

problems with javascript, need Help

Posted: Sun May 16, 2010 12:12 am
by DavidWarden
Hi there

I have a small question:

I have a mainpage and load "content" via javascript in a DIV.
this is working perfect.

but now this "content" has a form and I want use http://livevalidation.com/ to validate this form.
Now here nothing is working :cry:

I can use the livevalidation on any form without problems but it's not working on the external loaded "content".

WHY???

thank you!

Re: problems with javascript, need Help

Posted: Mon May 17, 2010 2:58 am
by cpetercarter
It may be to do with the order in which things happen.

Your page loads. It contains an empty div where later the browser will place content. The form validation script loads. It scans the page and finds no form. Then the script runs which loads the content. It loads the form into the page. But the validation script does not know that this has happened. So you do not get automatic live validation.

You may be able to solve the problem by ensuring that the content loads before the form validation script is called.