Hello,
I have a javascript function that I want to read the name of the form
which is calling it.
Here is my HTML:
<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaS cript">
function formNameTest(oT his)
{
alert('Form name is "'+oThis.form.n ame+'"')
}
</SCRIPT>
</HEAD>
<BODY>
<FORM NAME="Test">
<INPUT TYPE="TEXT" NAME="TestText" onClick="formNa meTest(this)">
</FORM>
</BODY>
</HTML>
and what it ends up displaying in the alert window is "[object]" instead of
the form's name. I have also tried using 'oThis.form.nam e.value' which
gives "".
And finally, I tried passing 'this.form' to my fuction (and modified my
function) instead of 'this', with no luck.
So, how can this be done?
Thanks in advance,
Scott Navarre
I have a javascript function that I want to read the name of the form
which is calling it.
Here is my HTML:
<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaS cript">
function formNameTest(oT his)
{
alert('Form name is "'+oThis.form.n ame+'"')
}
</SCRIPT>
</HEAD>
<BODY>
<FORM NAME="Test">
<INPUT TYPE="TEXT" NAME="TestText" onClick="formNa meTest(this)">
</FORM>
</BODY>
</HTML>
and what it ends up displaying in the alert window is "[object]" instead of
the form's name. I have also tried using 'oThis.form.nam e.value' which
gives "".
And finally, I tried passing 'this.form' to my fuction (and modified my
function) instead of 'this', with no luck.
So, how can this be done?
Thanks in advance,
Scott Navarre
Comment