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!

Style sheet in Netscape

Status
Not open for further replies.

arunjp

Programmer
Jan 10, 2001
29
US
Hi !
How to change the background color of the text field dynamically (in Javascript), that should work both in Netscape and I.E

AJP
 
I don't believe you can do this in Netscape 4.X in any reliable or useable manner. In IE you can use:

document.formname.element.style.backgroundColor="color"

That probably works in NS6 also. Oh yeah, and in my humble opinion, you should forget about NS4, as less than 10% of the total users of the using it. Support NS6 and IE. That is the future. jared@aauser.com
 
Hi jared !
Thanx for ur response. u r right, but the problem is, Iam into intranet project. The browser is Netscape 4.7 and I.E 5.0 . So os there any possibility to control the background color of the form field or the table column (TD), that is browser compatible.

Thanx
AJP
 
for table cells, use <td bgcolor=&quot;color&quot;>

for netscape to dispay this, though, it must have something in the cell. adam@aauser.com
 
but &quot;something&quot; can be &quot;&amp;nbsp;&quot; that is not much ;]
 
jaredn, as for your statement that most users do not use ns4+ :
I 'd like to inform you that I was sure at that too, until I checked it on my own site,and was surprised to find out
that 50% !!! r using ns 4+ with my site, and 50% with ie, usually ie 5+ (that's the average of course. There were days of 60% 40% or 40% 60%).
That means I can't ignore this version, and sometimes I really want that.
I guess it won't be different for others.
 
A recent look at browser stats site said only 21% are using ANY version of NS (I venture to say at least 1/3-1/2 are using NS6). Perhaps you're market is less diverse than the report I read. jared@aauser.com
 
ok. It IS less diversed. It's a university and the workers r getting computers with netscape, not ie.
So i guess it changes the picture a bit, since they r part of the site users.
I wanted to say &quot;gotch&quot; to me, but don't know how it goes.
&quot;Caught me&quot;???
:)
 
yeah:

&quot;You got me!!!&quot; works :eek:) jared@aauser.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top