It works fine in IE. Any advice?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<html xmlns="<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<script type="text/JavaScript">
<!--
function comboSend(selectObj) {
// get the index of the selected option
var idx = selectObj.selectedIndex;
// get the value of the selected option
var color = selectObj.options[idx].value;
if((color == "blue") && (form1.number[1].checked))
{
alert("Aha!, Blue and 2 have been selected");
}
if((color == "green") && (form1.number[2].checked))
{
alert("Aha!, Green and 3 have been selected");
}
}
function radioSend(rSend)
{
var rVal = rSend.value;
var cIndex = form1.color.selectedIndex;
if((rVal == "2") && (form1.color.options[cIndex].value == "blue"))
{
alert("2 and Blue");
}
if((rVal == "3") && (form1.color.options[cIndex].value == "green"))
{
alert("3 and Green");
}
}
//-->
</script>
</head>
<body>
<form action="" method="post" name="form1" id="form1" >
<p>
<select name="color" size="1" id="color" onchange="comboSend(this)" >
<option value="none" selected="selected">Select</option>
<option value="red" >Red</option>
<option value="blue" >Blue</option>
<option value="green" >Green</option>
</select>
</p>
<p><input name="number" type="radio" id="1" value="1" onclick="radioSend(this)" />1</p>
<p><input name="number" type="radio" value="2" id="2" onclick="radioSend(this)" />2</p>
<p><input name="number" type="radio" value="3" id="3" onclick="radioSend(this)"/>3 </p>
</form>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<html xmlns="<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<script type="text/JavaScript">
<!--
function comboSend(selectObj) {
// get the index of the selected option
var idx = selectObj.selectedIndex;
// get the value of the selected option
var color = selectObj.options[idx].value;
if((color == "blue") && (form1.number[1].checked))
{
alert("Aha!, Blue and 2 have been selected");
}
if((color == "green") && (form1.number[2].checked))
{
alert("Aha!, Green and 3 have been selected");
}
}
function radioSend(rSend)
{
var rVal = rSend.value;
var cIndex = form1.color.selectedIndex;
if((rVal == "2") && (form1.color.options[cIndex].value == "blue"))
{
alert("2 and Blue");
}
if((rVal == "3") && (form1.color.options[cIndex].value == "green"))
{
alert("3 and Green");
}
}
//-->
</script>
</head>
<body>
<form action="" method="post" name="form1" id="form1" >
<p>
<select name="color" size="1" id="color" onchange="comboSend(this)" >
<option value="none" selected="selected">Select</option>
<option value="red" >Red</option>
<option value="blue" >Blue</option>
<option value="green" >Green</option>
</select>
</p>
<p><input name="number" type="radio" id="1" value="1" onclick="radioSend(this)" />1</p>
<p><input name="number" type="radio" value="2" id="2" onclick="radioSend(this)" />2</p>
<p><input name="number" type="radio" value="3" id="3" onclick="radioSend(this)"/>3 </p>
</form>
</body>
</html>