Jehan wrote:
At the end of my HTML page I have following.....
<script>
for (i = 0; i < document.section_entry.length;i++) {
// some code
}
</script>
Here it gives an error that "document.section_entry.length is null or
not a object". "section_entry" is the name of a form on my page.
It could mean that the form object is not fully loaded into the
document. Note that your script is not a function either but rather an
immediate query about the form. type is not defined, which is a
validation syntax error. i is also defined as a global variable. You're
not using defer attribute either. All this is risky, not recommendable,
when the document is still being loaded, parsed, rendered.
When I have this same code inside a function (instead of at a global
level like how it is here) it works fine.
Because your function is most likely called once the document is fully
loaded into the browser memory... or your function is merely called when
the document is still loading... or..
Anyone have any ideas what is causing the error?
Thanks in advance for any help,
Jehan
Without providing an url or sufficient chunks of relevant code, it's
impossible to say without actually seeing the source code.
DU
--
Javascript and Browser bugs:
http://www10.brinkster.com/doctorunclear/
- Resources, help and tips for Netscape 7.x users and Composer
- Interactive demos on Popup windows, music (audio/midi) in Netscape 7.x
http://www10.brinkster.com/doctorunc...e7Section.html