I posted before regarding a problem I was having with the new Mozilla browser. The code below pastes to a span in every browser except Mozilla. Somebody asked that I post the entire script so they could get a better idea as to why it isn't working...
Can someone please tell me what I put in to detect mozilla and what code pastes to the span in Mozilla.
<html>
<head>
<script language="javascript">
<!---
function pasteit() {
gloat="<b>yada</b>";
if (document.layers) {
document.layers.news.document.write(gloat)
document.layers.news.document.close()
} else if (document.all) {
news.innerHTML=gloat;
} else if (document.getElementById) {
document.getElementById("news").innerHTML=gloat;
} else {
return;
}
}
//-->
</script>
</head>
<body onload="pasteit();">
<TABLE BORDER="0" WIDTH="200" CELLPADDING="5" CELLSPACING="0" height="80">
<tr>
<tD width="100%" style="padding:5px;" align="center">
<SPAN ID="news"></SPAN>
</TD>
</TR>
</TABLE>
</body>
</html>
thanxalot.
Can someone please tell me what I put in to detect mozilla and what code pastes to the span in Mozilla.
<html>
<head>
<script language="javascript">
<!---
function pasteit() {
gloat="<b>yada</b>";
if (document.layers) {
document.layers.news.document.write(gloat)
document.layers.news.document.close()
} else if (document.all) {
news.innerHTML=gloat;
} else if (document.getElementById) {
document.getElementById("news").innerHTML=gloat;
} else {
return;
}
}
//-->
</script>
</head>
<body onload="pasteit();">
<TABLE BORDER="0" WIDTH="200" CELLPADDING="5" CELLSPACING="0" height="80">
<tr>
<tD width="100%" style="padding:5px;" align="center">
<SPAN ID="news"></SPAN>
</TD>
</TR>
</TABLE>
</body>
</html>
thanxalot.
Comment