View Full Version : form problem

01-30-2006, 03:08 AM
this is a code i wrote just to check something that didnt seem to work in my site.

when i press on the button i get an error: "object doesnt support this property or method".

i've checked it without the form and it worked. but when i place the button inside the form it doesnt. i've tried to switch between get and post and other things but i'm probably missing something.


function aaa(num)


<form name = "form1" action="" method="post">
<input type="button" name="aaa" value="press" onClick="aaa('3')" />

01-30-2006, 03:31 AM
It seems like it doesn't like the method name aaa. I changed it to bbb (or even to aa or aaaa) and it worked. I don't know if aaa is a reserved word or not. It doesn't look like one but changing it worked.

01-30-2006, 03:44 AM
i dont belive it... i was about two murder my computer.
thanks for saving it (and me) ;)

01-30-2006, 11:23 AM
The problem is that you use the same name for the control as the function. Some browsers in some modes place element names as variable names in the global scope, thus overwriting functions and variables with the same names.

01-31-2006, 03:55 AM
Oopps, I didn't notice the button name was "aaa". How did I miss that. :D