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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DHTML Tables w/ Netscape 2

Status
Not open for further replies.

ziploc1010

Programmer
Apr 14, 2001
13
US

Does Netscape have the compatibility for:

<td id=tdName ... >

b/c my code works in Internet Explorer,
but it won't bring up my table in Netscape.

If Netscape isn't compatible w/ this,
is there any way to change the background of
a td dynamically?

 
I had the same problem, Netscape does not change the background of a TD, look at my code that I had to use to get around it. I used a NN ilayer in the TD if the browser was not IE. then later on wrote the HTML to end the ilayer I could change the ilayer's background property to give me the same look as IE with TD background changed

<TD class=&quot;menuTDclass&quot;>
<script language=&quot;JavaScript&quot;>
if (!isIE4)
document.write(ilayer);
</script>
<A class=submenuALINK href=&quot;xuseml.html&quot;>Under C'struction</A>
<script language=&quot;JavaScript&quot;>
if (!isIE4)
document.write(endilayer);
</script>
</TD>

the
Code:
ilayer
variable was var ilayer = &quot;<ILAYER width=100% height=12 BGCOLOR='#6A9919' Z-INDEX='-4'>&quot;; and the
Code:
endilayer
variable was var endilayer = &quot;</ilayer>&quot;;

Basically it is possible with Ilayers. I will show you more code if you need it.
Klae..
 
Thanks Klae, that will come in handy. Is the <ilayer> tag specific to Netscape 6, or will it work in 4.x , also?
 
How would one change the innerHTML of a td in Netscape?
 
Netscape doesn't support the function innerHTML. so if you do have ilayers in your TDs then you can use the code..


Code:
document.ilayername.document.open();


To open the Ilayer for writing and then use...


Code:
document.ilayername.document.write(&quot;write text here&quot;);


After done with writing to Ilayer then use the close() method.


Code:
document.ilayername.document.close();


You may need to substitute your <ILAYER> tags with <LAYER> tags and absolutely position your <LAYER> tags because I can't remember if the code I've just exampled works with both <LAYER> and <ILAYER> tags I've only used it for <LAYER> tags.
Klae

You're only as good as your last answer!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top