I am doing the following on one of my pages:

document.observe("dom:loaded", function() {
    Event.observe('fm', 'submit', checkReqFields, false);


The line:

Event.observe('$formName', 'submit', checkReqFields, false);

is causing an "element is null" error on page load. If I remove that
line, I don't get the error. The form that is referenced exists, the
function checkReqFields exists and the script is located after the
HTML, so all of the elements should exist before it is executed.

I do something very similar on another page and it works fine. Any
ideas as to what is causing this problem?

You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to