Radio Buttons

N

NamFu

Your welcome :)


Rick said:
I am having a problem getting the value of my radio buttons. I am new to
Java please help me see my error if you can. THANKS soooo much.

<html>
<head>
<title>CCR</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin Hiding Script

function ShipSame()

{
var d = document.usernew;

var theone=document.usernew.Pay1.selectedIndex;
var theone=document.forms[0].Pay1.value;

if ( document.usernew.Pay1.value == '1')
{
result2 = 29.95;
result1 = 0;}

else
alert(d.Pay1.value)
{result1 = 0;
result2 = 0;}

{result = result2+result1
document.forms[0].Price.value = result;}

}


// END Hiding Script -->
</SCRIPT>
</head>

<body>
<form action="" method="post" name="usernew">
<p>&nbsp;</p>
<table width="400" border="0" cellspacing="0" cellpadding="0">
<tr align="center">
<td colspan="3">BASE WITH ACCIDENT PLAN</td>
</tr>
<tr>
<td width="147">Individual</td>
<td width="123">Family</td>
<td width="130">&nbsp;</td>
</tr>
<tr>
<td>
<input type='radio' name='Pay1' value='1' onClick='ShipSame()'>
$29.95 monthly</td>
<td>
<input name="Pay1" type="radio" onClick="ShipSame()" value="NO">
$39.95 monthly </td>
<td>&nbsp;</td>
</tr>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp; </p>
<p>
<input name="Price" type="text" size="20">
</p>
</form>
</body>
</html>




x-- 100 Proof News - http://www.100ProofNews.com
x-- 3,500+ Binary NewsGroups, and over 90,000 other groups
x-- Access to over 1 Terabyte per Day - $8.95/Month
x-- UNLIMITED DOWNLOAD
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top