I have 2 radio buttons one of them with the id called pilotverify. If I select the radio button I would like for and event to be triggered called checkForm which will set the ID closeThis display:inline; to display:none;
I am not sure of how to set this up with the code that I have. Can someone please help. Here is the code.
<!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>
<style type="text/css">
<!--
#closeThis {
display:inline;
}
-->
</style>
<script language="JavaScript" type="text/javascript">
function checkForm() {
pilotverify = document.getElementById("pilotverify").value;
if (pilotverify == 0) {
document.getElementById("closeThis").style.display = "none";
return false;
}
return true;
function showContent() {
document.getElementById("closeThis").style.display = "inline";
}
</script>
</head>
<body>
<form action="" method="post">
<table>
<tr>
<td style="width:50%; border-right:#000000 solid 1px; line-height20px; text-align:right; padding-right:5px;"><span style="color:##3FF0000 !important; font: .900em/20px italic Verdana; margin-right:5px;">(required *)</span><span style="font: .900em/20px normal Verdana, Arial, Helvetica, sans-serif;">Are you an ALPA Member:</span></td>
<td style="padding-left:5px;"><input name="pilotverify" type="radio" value="1" checked="checked" />
<span style="font: .900em/20px normal Verdana, Arial, Helvetica, sans-serif;">Yes</span>
<input onblur="checkForm();" name="pilotverify" type="radio" id="pilotverify" value="0" />
<span style="font: .900em/20px normal Verdana, Arial, Helvetica, sans-serif;">No</span></td>
</tr>
<tr>
<td style="width:50%; border-right:#000000 solid 1px; line-height20px; text-align:right; padding-right:5px;" colspan="2"><label>submit</label>
<input type="submit" name="textfield" />
</td>
<td style="padding-left:5px;"> </td>
</tr>
<tr id="closeThis">
<td colspan="2">This is a test</td>
</tr>
</table>
</form>
</body>
</html>
I am not sure of how to set this up with the code that I have. Can someone please help. Here is the code.
<!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>
<style type="text/css">
<!--
#closeThis {
display:inline;
}
-->
</style>
<script language="JavaScript" type="text/javascript">
function checkForm() {
pilotverify = document.getElementById("pilotverify").value;
if (pilotverify == 0) {
document.getElementById("closeThis").style.display = "none";
return false;
}
return true;
function showContent() {
document.getElementById("closeThis").style.display = "inline";
}
</script>
</head>
<body>
<form action="" method="post">
<table>
<tr>
<td style="width:50%; border-right:#000000 solid 1px; line-height20px; text-align:right; padding-right:5px;"><span style="color:##3FF0000 !important; font: .900em/20px italic Verdana; margin-right:5px;">(required *)</span><span style="font: .900em/20px normal Verdana, Arial, Helvetica, sans-serif;">Are you an ALPA Member:</span></td>
<td style="padding-left:5px;"><input name="pilotverify" type="radio" value="1" checked="checked" />
<span style="font: .900em/20px normal Verdana, Arial, Helvetica, sans-serif;">Yes</span>
<input onblur="checkForm();" name="pilotverify" type="radio" id="pilotverify" value="0" />
<span style="font: .900em/20px normal Verdana, Arial, Helvetica, sans-serif;">No</span></td>
</tr>
<tr>
<td style="width:50%; border-right:#000000 solid 1px; line-height20px; text-align:right; padding-right:5px;" colspan="2"><label>submit</label>
<input type="submit" name="textfield" />
</td>
<td style="padding-left:5px;"> </td>
</tr>
<tr id="closeThis">
<td colspan="2">This is a test</td>
</tr>
</table>
</form>
</body>
</html>