Alright Dan, the problem is almost certainly this.  You have to
consider WHEN the script will run as well as what the contents of the
script are.  This was a problem with another user as well.  Hooking
the "beforeinsert" event means that the script will run after the page
has been downloaded by Ajax and before it has been inserted into the
DOM which is displayed.  I doubt that is what you meant to do.  At
this point in time the "form" is not part of the Document so of course
the reference to it is undefined.  I get the impression (from the
location of the <script> tag in your example) that you want it to run
after the "form" has been inserted into the DOM and possibly after the
user has entered some data in the form and is submitting the form.
Either of these can be done but you have to let us know what you are
trying to do here.  The location of the <script> tag in the code has
nothing to do with WHEN the script will be run.

Skip


-- 
You received this message because you are subscribed to the Google Groups 
"iPhoneWebDev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/iphonewebdev?hl=en.

Reply via email to