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!

Inner.text compatible with Netscape - plz help!

Status
Not open for further replies.

awol2k

Programmer
Apr 23, 2001
7
US
inner.text is not support with netscape. I need something that is. Here is my code in the <head>...

function ShowParams() {
var p = pano.GetPitch();
var y = pano.GetYaw();
var z = pano.GetZoom();

Pitch.innerText = p;
Yaw.innerText = y;
Zoom.innerText = z;

Then down in the HTML I have the following...

<P id=Yaw>&nbsp;</P></font>
<P id=Pitch>&nbsp;</P></font>
<P id=Zoom>&nbsp;</P></font>

So does anyone have anything that would work with NS since inner.text doesn't?

Thanks in advance,

Ed
 
Netscape does not take &quot;P&quot; tag as an object. The only thing in which you can write is divs and layers. For compatibility you can write the code as :

function ShowParams() {
var p = pano.GetPitch();
var y = pano.GetYaw();
var z = pano.GetZoom();

if(document.all)
{
Pitch.innerText = p;
Yaw.innerText = y;
Zoom.innerText = z;
}
else
{
document.layers.Pitch.document.write(p);
document.layers.Yaw.document.write(y);
document.layers.Zoom.document.write(z);
}

Then down in the HTML I have the following...

<div id=Yaw name=Yaw> </div></font>
<div id=Pitch name=Pitch> </div></font>
<div id=Zoom name=Zoom> </div></font>



 
That's for Netscape 4.x. Netscpae 6/Mozilla, has a method for innerHTML and innerText, but it has to be accessed a little differently than IE. Check out the latest documentation at
 
this will work for IE5+/mozilla (ns6)

document.getElementById(&quot;elementid&quot;).innerHTML = &quot;sme <b>tesxt</b> jared@eae.net -
 
Okay this is driving me nuts. Here is my page: I am not worried about NS6 at the moment. If anyone can look at this with IE first you will see what it should, and does, do. Then look with NS4 (not NS6). Jacked!

I made the chages that RemoteSilicon suggested above but still a no go. Could it be the way I am accessign the applet pano?

Thanks for your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top