DIV not dispalyed in FireFox/Netscape
Posted: Mon Nov 15, 2004 6:58 am
This works fine in IE6.0 but not in FireFox/Netscape ,Please help me to sort this out .Your help is most welcomed.
Code: Select all
<script language="JavaScript1.2">
<!--Client Side Validation-->
// displays additional spouse details inputs if marital status is selected as 'married'.
function showSpouseForm() {
if (document.form.maris.optionsїdocument.form.maris.selectedIndex].value ==2)
{
document.getElementById('spouseform').style.display = 'inline';
return true;
}
else
{
document.getElementById('spouseform').style.display = 'none';
document.form.sname.value = "";
document.form.sfullname.value = "";
document.form.sedu.value = "";
document.form.sbldgp.value = "";
document.form.sprofession.value = "";
document.form.sbday.value = "";
document.form.sbmonth.value = "";
document.form.sbyear.value = "";
return false;
}
}
</script>
<select name="maris" onchange="showSpouseForm()">
<option value="">
<center>
-
</center>
</option>
<option value="1"><span>Single</span></option>
<option value="2" ><span>Married</span></option>
</select>
<div id="spouseform" style="display:none;">
<table width="100%" >
<tr>
<td colspan="4" height="21" valign="top" bgcolor="#cacaca">
<center>
<b><span class="blanc"><font color="#306090" size="+1">Enter Your Spouse's Detail</font></span></b>
</center>
</td>
</tr>
<tr>
<td width="222" height="32"><span><b>Name <font color="red">*</font>
: </b></span></td>
<td width="241" valign="top">
<input type="text" value="" name="sname">
</td>
<td valign="top" width="240"><span><b>Fullname <font color="red">*</font>
: </b></span></td>
<td width="248" valign="top">
<input type="text" value="" name="sfullname">
</td>
</tr>
<tr>
<td width="222" height="32"><span><b>Education <font color="red">*</font>
: </b></span></td>
<td>
<input type="text" value="" name="sedu">
</td>
<td valign="top"><span><b>Blood gp.<font color="red">*</font> : </b></span></td>
<td valign="top">
<input type="text" value="" name="sbldgp">
</td>
</tr>
<tr>
<td height="25"><span><b>Profession : </b></span></td>
<td colspan="3" valign="top"><span>
<select name="sprofession">
<option value="">
<center>
-
</center>
</option>
<option value="m">top executive</option>
<option value="p">self-employed</option>
<option value="ac">teacher/researcher</option>
<option value="t">computer programer/engineer</option>
<option value="ot">other technical profession/engineering</option>
<option value="cs">customers service/customers support </option>
<option value="ad">administrative department</option>
<option value="sa">Marketing</option>
<option value="tc">Craftsman</option>
<option value="st">Student</option>
<option value="ks">high school student/college student</option>
<option value="h">at home services</option>
<option value="se">independent</option>
<option value="n">unemployed</option>
<option value="r">Retired</option>
<option value="o">other</option>
</select>
</td>
</tr>
<tr>
<td height="60"><span><b>Date of birth<font color="red">*</font></b>
: </span></td>
<td>
<input type="text" name="sbday" value="" size="2"><span>
<select name="sbmonth">
<option value="">
<center>
-
</center>
</option>
<option value="1" >January</option>
<option value="2">February</option>
<option value="3">March</option>
<option value="4" >April</option>
<option value="5">May</option>
<option value="6">June</option>
<option value="7">July</option>
<option value="8" >August</option>
<option value="9">September</option>
<option value="10">October</option>
<option value="11">November</option>
<option value="12" >December</option>
</select>
<input type="text" name="sbyear" value="" size="4">
</td>
<td></td>
<td></td>
</tr>
</table>
</div>