Click to See Complete Forum and Search --> : dynamic color change with Navigator?
rgoya
12-12-2002, 10:45 AM
so my script works great with MSIE:
The Ultimate Original JavaScript ColorShow (http://www.geocities.com/rgoya/javascript/ColorShow.htm)
all the elements change (BG,TEXT,LINK,VLINK,SCROLLBAR) -- but with Navigator, only the BG (and TEXT that isn't in tables) changes... I toyed with some CSS style tags, but that didn't help. Is there a solution? I considered rebuilding the page using transpixel spacers instead of tables so the text will change - but what about the other elements? ColorShow is also featured at The JavaScript Source (BG EFFECTS). Any suggestions? :confused:
gil davis
12-12-2002, 04:26 PM
Define "Navigator". There is a huge difference between NS 4.x and NS 6+.
NS 4 will not change the color of text that has already been rendered. You would have to use document.write() to a layer to change the color of the text.
NS 6 is a DOM compliant browser that adheres to W3C recommendations. You should be able to use DOM methods to change anything you like on your page.
rgoya
12-12-2002, 06:37 PM
I am testing with Navigator 7.0 - and the text color ONLY changes OUTSIDE tables after the document renders. Using window.document.fgColor.value property... I'm not too familiar with layers (HTML dinosaur) - can a new layer overlay the previous one to "change" the color of all the text? What if the script does this automatically and repeatedly every second (or less) - is there a limit to how many layers a document can have?
gil davis
12-13-2002, 08:43 PM
Originally posted by rgoya
I'm not too familiar with layers (HTML dinosaur) - can a new layer overlay the previous one to "change" the color of all the text? What if the script does this automatically and repeatedly every second (or less) - is there a limit to how many layers a document can have?
My comment on layers was meant to cover changing the color of text in NS 4 only. If you wanted to change all the text (like document.fgColor would work) then you would have to write the whole document each time you wanted to change fgColor. You could trick NS 4 by making one layer in the document and then change the src attribute of the layer or reload the layer after changing fgColor, but that would probably be rather extreme.
I don't think you'd want to do that "every second (or less)".
I don't know if there is a documented limit for layers, but I'm sure that memory would limit you at some point. The <layer> and NS 4 are pretty much a dead issue, anyway.
As to NS 7, perhaps someone else can comment on that. I haven't decided to dl it yet.