R
Randell D.
Folks,
I have a form (called FORM1) - In my INPUT submit tag, I have an onClick
event that I have successfully tested/used to display the value of a TEXT
box using the following function (called via an onClick event)
<script type="text/javascript">
function performPrePostChecks()
{
// myName being an iput text box
// hosted being an input radio box
h=document.form1.myName.value;
alert(h);
return false;
}
How can I read the value of a radio button like I have the text box?
At the moment, if I have it catch myName, I get the value I entered in to
the box named myName in an alert box.
When I change the function to instead catch the value of the radio button
(called hosted) - The alert box says "undefined".
Are radio buttons handled differently?
I know the above function is basic - I've just narrowed my problem down to
not reading the radio button properly hence no need for me to list the rest
of the code.
All help, via the newsgroup would be much appreciated,
Thanks
Randell D.
I have a form (called FORM1) - In my INPUT submit tag, I have an onClick
event that I have successfully tested/used to display the value of a TEXT
box using the following function (called via an onClick event)
<script type="text/javascript">
function performPrePostChecks()
{
// myName being an iput text box
// hosted being an input radio box
h=document.form1.myName.value;
alert(h);
return false;
}
How can I read the value of a radio button like I have the text box?
At the moment, if I have it catch myName, I get the value I entered in to
the box named myName in an alert box.
When I change the function to instead catch the value of the radio button
(called hosted) - The alert box says "undefined".
Are radio buttons handled differently?
I know the above function is basic - I've just narrowed my problem down to
not reading the radio button properly hence no need for me to list the rest
of the code.
All help, via the newsgroup would be much appreciated,
Thanks
Randell D.