Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"... is not an object" error keeps appearing? 1

Status
Not open for further replies.

ripple

Programmer
Jul 17, 2001
6
US
heh, this is strange. i get an error that says:

"window.document.form.clock" is not an object. i have a text box named 'clock' inside a form named 'form' - and the function that the error is refering to still works (that is, the text box is updated with the time every second). it works, so i'm not real worried about fixing it, but does anybody happen to know why IE is complaining? havent tested it in netscape, as it is for an intranet.

any insight is appreciated :)
 
Can you show me the source code. Otherwise I wont be able
to help you. But you what you could do is scripterror handling :

< ... OnError=&quot;HandleError()&quot; ... >

<script language=&quot;JavaScript&quot;>
<!--

void(1+1=2)

//-->
</script>

Although I dont know if this works, I would try it anyway.

BobbaFet Everyone has a right to my opinion.
E-mail me at cwcon@programmer.net
 
hmm,

i wouldnt put &quot;window&quot; in, i would write:

document.form.clock (.value or whatever)

and that error typically pops up when either you havent told it right where it is (say, in a layer or something?) or if you are calling the script on an onLoad or something that is calling the script before the text box is created.

...without seeing the code, thats the best i can do ;) ~ jsLove ;)
 
I also wouldn't call your form &quot;form&quot;. Call it &quot;myform&quot; or something else. Javascript has problems with things like that. FYI: it also doesn't like functions and form objects like buttons having the same name.
Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top