Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Netscap 4 problem anybody help? Code provided

Status
Not open for further replies.

maybe

Instructor
Jul 11, 2001
14
GB
This won't work in netscap 4+ anybody help

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=iso-8859-1&quot;>
<SCRIPT>
var contentlayer;
function changelayer_content(layerno){
msgstring=&quot;<span class='blackText'> &quot;+layerno+&quot;</span>&quot;;

if(document.layers){
//thisbrowser=&quot;NN4&quot;;
contentayer = document.layers[&quot;content&quot;];
contentlayer.document.open();
contentlayer.document.write(msgstring);
contentlayer.document.close();
}

if(document.all){
//thisbrowser=&quot;ie&quot;
contentlayer = document.all[&quot;content&quot;];
contentlayer.innerHTML=msgstring;
}
if(document.getElementById){
//thisbrowser=&quot;NN6&quot;;
contentlayer = document.getElementById(&quot;content&quot;);
contentlayer.innerHTML =msgstring;
//contentlayer.document.open();
//contentlayer.document.write(msgstring);
//contentlayer.document.close();
}
}
</SCRIPT>
</head>

<body bgcolor=&quot;#FFFFFF&quot; text=&quot;#000000&quot;>



<a href=&quot;#&quot; onMouseOver=&quot;changelayer_content('new text');&quot;>Change Text</a>



<SCRIPT language=&quot;JavaScript1.2&quot;>

//specify speed of scroll (greater=faster)
var speed=4

iens6=document.all||document.getElementById
ns4=document.layers
if (iens6){document.write('<div id=&quot;container&quot; style=&quot;position:relative;width:320;height:225px;overflow:hidden&quot;>')
document.write('<div id=&quot;content&quot; style=&quot;position:relative;width:320;height:1500;left:0;top:0&quot;>')
}
</script>
<ilayer name=&quot;nscontainer&quot; width=320 height=225 clip=&quot;0,0,350,225&quot;>
<layer name=&quot;nscontent&quot; width=320 height=1500 visibility=visible>
First Text
</layer>
</ilayer>
</body>
</html>
 
what doesnt work? i had a quick look at your code and noticed you are missing an l in line

contentlayer = document.layers[&quot;content&quot;];

perhaps it is that?

hope this helps

rob

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top