my radio button not taking input

sunilvedula

Sunil
Local time
Today, 10:14
Joined
Jan 18, 2007
Messages
138
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
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[URL]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd[/URL]">
<html xmlns="[URL]http://www.w3.org/1999/xhtml[/URL]" xml:lang="en" lang="en">
<head>
  <title>Disputes scription tool</title>
  <meta http-equiv="generator" content="CoffeeCup HTML Editor ([URL="http://www.coffeecup.com"]www.coffeecup.com[/URL])" />
  <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>
 
Last edited:
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.
 

Users who are viewing this thread

Back
Top Bottom