greatguns
03-02-2006, 03:22 PM
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Register for Service</title>
<link type="text/css" rel="stylesheet" href="styles.css" />
<script language="JavaScript" type="text/javascript">
function unhidefrm(str) {
if(str=="tt Service") {
phnotb.style.display="inline";
report.style.display="none";
}
else if(str=="Reports")
{
phnotb.style.display="none";
report.style.display="inline";
}
else if(str=="service")
{
phnotb.style.display="none";
report.style.display="none";
}
}</script>
</head>
<body>
<br />
<br />
<br />
<center>
<select align="center" name="servicesel" onchange="unhidefrm(this.value)"><option value="service" selected="selected" >Select A Service</option><option value="tt Service">tt Service</option>
<option value="Others">Others</option>
<option value="Reports">Reports</option>
</select>
<br /><br /><br />
<table id="report" style="display:none" align="center">
<tr>
<td><h1>No Need To Register For Reports</h1></td>
</tr>
<tr>
<td align="center"><input type="button" value="Back" onclick="history.back()" /></td>
</tr>
</table>
<form name="regserv" method="post" action="register_service.jsp" onsubmit='return valphno()'>
<table id="phnotb" align="left" width="80%" cellspacing="5" cellpadding="5" style="display:none">
<tr align="center" >
<td width="54%" align="right"><label><b>Your val</b></label></td>
<td width="46%" align="left"><input type="text" size="20" name="ttlphno" onkeypress ="numOnly()"/></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td height="43"> </td>
<td><input name="Submit" type="submit" value="Submit" /></td>
<td> </td>
</tr>
</table>
<input type="hidden" value="1" name="submitmode" />
</form>
<h1> </h1>
<h1> </h1>
<h1> </h1>
<h1> </h1>
</center>
</body>
</html>
Thats my code....it works fine in IE/Opera and other browsers.
but firefox gives the javascript error phnotb is not defined....
pleaseeee help....this error is driving me crazy since 2 days :crying:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Register for Service</title>
<link type="text/css" rel="stylesheet" href="styles.css" />
<script language="JavaScript" type="text/javascript">
function unhidefrm(str) {
if(str=="tt Service") {
phnotb.style.display="inline";
report.style.display="none";
}
else if(str=="Reports")
{
phnotb.style.display="none";
report.style.display="inline";
}
else if(str=="service")
{
phnotb.style.display="none";
report.style.display="none";
}
}</script>
</head>
<body>
<br />
<br />
<br />
<center>
<select align="center" name="servicesel" onchange="unhidefrm(this.value)"><option value="service" selected="selected" >Select A Service</option><option value="tt Service">tt Service</option>
<option value="Others">Others</option>
<option value="Reports">Reports</option>
</select>
<br /><br /><br />
<table id="report" style="display:none" align="center">
<tr>
<td><h1>No Need To Register For Reports</h1></td>
</tr>
<tr>
<td align="center"><input type="button" value="Back" onclick="history.back()" /></td>
</tr>
</table>
<form name="regserv" method="post" action="register_service.jsp" onsubmit='return valphno()'>
<table id="phnotb" align="left" width="80%" cellspacing="5" cellpadding="5" style="display:none">
<tr align="center" >
<td width="54%" align="right"><label><b>Your val</b></label></td>
<td width="46%" align="left"><input type="text" size="20" name="ttlphno" onkeypress ="numOnly()"/></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td height="43"> </td>
<td><input name="Submit" type="submit" value="Submit" /></td>
<td> </td>
</tr>
</table>
<input type="hidden" value="1" name="submitmode" />
</form>
<h1> </h1>
<h1> </h1>
<h1> </h1>
<h1> </h1>
</center>
</body>
</html>
Thats my code....it works fine in IE/Opera and other browsers.
but firefox gives the javascript error phnotb is not defined....
pleaseeee help....this error is driving me crazy since 2 days :crying: