Click to See Complete Forum and Search --> : Javascript onchange fails


VanJay011379
02-12-2003, 03:27 PM
Hello,

I am creating a guestbook for my site. I have an onchange event for my
email acceptance text box. For some reason, everytime the onchange event
occurs, I get an error from IE reading "object doesn't support that property
or method".

Why am I getting this message?

Try my site out for yourself:
http://gis38.exp.sis.pitt.edu/is2770/guest.html

Sincerely,

Chris

VanJay011379
02-12-2003, 06:05 PM
So you can't have a variable name and function with the same name huh?

Thanks! I would have never noticed that!

VanJay011379
02-12-2003, 06:45 PM
Does var make a variable local?

So you're saying without the var declaration, the variable is global?

linnie
02-12-2003, 06:51 PM
Yes, that's true. However, it can be a little confusing because even if you use var outside of all functions, it doesn't create a local variable. To put that another way, all variables created outside of functions are global variables. Inside functions is where the difference lies.

Lin

AH.C
02-12-2003, 11:28 PM
linnie/Dave Clark,

Could you please take a look at my post #3858
http://forums.webdeveloper.com/showthread.php?s=&threadid=3858.

I'm having problems with variables as well. I thot I saw the light with this thread, but after reevaluating my script, I'm still in the dark.:confused:

TIA