Perhaps you should read the tutorial that you copied that snippet from. It
looks like an example of code, not something intended to be copied and
pasted, but understood and applied.
If you don't know where you copied it from, I'll explain it. The tokens
separated by dots are objects in the HTML Document Object Model. "document"
is a generic term for the HTML document object itself. Items contained in an
object are denoted by dots and their names. So, in your case "myform" is a
reference to a form on the page. Note that it is not a generic reference,
but a specific reference to a specific form in that document (there can be
many forms in an HTML document). "myimage" is a reference to a specific
image object that is contained in the form referenced. "src" is a reference
to the "src" property (attribute) of the image object. Finally, the equals
sign is an assignment operator that assigns a value (to the right of the
equals sign) to an object (to the left of the equals sign). In this case,
you seem to be assigning the name "some.gif" to the "src" attribute of the
image object. The "src" attribute (property) of an image object is a string
that signifies the URL of the resource in question.
If ANY part of the statement is not correct, the whole statement fails. In
this case, the error message is very informative, telling you that
"document.myform.myimage is null or not an object". In other words, you are
referencing something that does not exist. Which part of your reference is
wrong? Only you could know that. Hopefully my explanation will provide the
information that you need to make this determination.
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.