View Full Version : my radio button not taking input


sunilvedula
11-30-2009, 12:42 AM
hi all,

I have written a small html coding with javascript. I have used radio button to say yes or no. The problem is the selection of the radio button is not being passed to the variable in the java script. fine the code below. pls help me out . it works fine in chrome browser but not in ie8 or ie6
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Disputes scription tool</title>
<meta http-equiv="generator" content="CoffeeCup HTML Editor (www.coffeecup.com (http://www.coffeecup.com))" />
<meta name="created" content="Sun, 29 Nov 2009 11:48:47 GMT" />
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<meta name="description" content="" />
<meta name="keywords" content="" />
<script language="javascript">
{
window.name="Index";
function validate()
{
if (document.form1.RADGRP[0].checked == true)
{
window.open('Q1Y1.html','Index');
}
else
{
window.open('Q1N1.html','Index');
}
}
}
</script>
</head>
<body
<form name = "form1" method = "POST">
<h2>Workflow for VISA DISPUTES</h2>
<P align="LEFT">Question: Did the customer authorize the transaction?</P>
<input name="RADGRP" type="radio" value="YES">Yes<br>
<input name="RADGRP" type="radio" value="NO">No<br>
<h3><input type="button" value="GO" onclick = "validate()"></h3>
</form>
</body>
</html>

adammark
01-28-2010, 08:07 PM
Hi Sunil.

I have seen your code. I think radio button event you have put which is onclick is wrong.
You have to try out onblurr event on radio button click. Hope this work for you.
Thank you.