PDA

View Full Version : myForm or document.myForm ???


sijp
08-17-2004, 08:16 AM
Hi,
I use mainly Mozilla FireFox and I got an error message on a site I visited, saying that 'myForm' is not defined. after looking at the source I have noticed that when you add the document object it will work...

so I will get to the main question:
is it ok to get Forms' properties in javascript without writing "document." ?

I am asking this because I used to do that and never noticed mistakes:confused:

thanks,
sijp

senshi
08-22-2004, 03:59 PM
sure you can use the this.myform call also, this. refers to the object that called the routine or the object thats attached to the function...