Getting the value of checked radio button

This Content Component encountered an error
This Content Component encountered an error
If there are two radio buttons with same name and different values and you want to get the value of a checked radio button, we can use an indirect method. Create a field with type hidden and in the onClick event of radio buttons, write down the values to the hidden field.
function test(mvalue)
{
document.forms[0].industry.value=mvalue;
}
function show()
{
temp=document.forms[0].industry.value;
alert(temp);
}

<input type="hidden" name="industry">
<input type="radio" name="r" value="Manufacturing"
onClick="test(this.value)">
<input type="radio" name="r" value="Service"
onClick="test(this.value)">
<input type="button" name="b" onClick="show()">
This was first published in May 2001

Dig deeper on Lotus Notes Domino Administration Tools

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchWinIT

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchEnterpriseLinux

SearchVirtualDataCentre.co.UK

Close