bu****@hotmail.com wrote:
I know Netscape 4 is Ancient and horrible but I need to make my site
Netscape 4.8 compatible. But how can I rewrite HTML code/do minor DTHML
on my site with Netscape 4/4.8, document.write works, but I cant remove
anything with it. Mostly what I need to do is remove/disable a embed or
object tag if a user clicks a button, and write it back in if they
click another.
Frankly if you do not have a clue about NN 4 and are building a web site
now then make it NN 4 compatible by serving static HTML to NN 4 with
script for DOM browsers with appropriate checks so that NN 4 users do
not get script errors.
That way the site works for NN 4 users, even if dynamic effects are not
there.
The only thing that Netscape 4 can do dynamically besides scripting
forms is the manipulation of the visibility, clipping, background, and
complete content of what it sees as layers.
Thus if you have CSS
<style type="text/css">
#embedLayer {
position: relative;
}
</style>
and HTML
<div id="embedLayer">...</div>
then in NN 4 you can hide that div using
var layer;
if (document.layers && (layer = document.layers.embedLayer)) {
layer.visibility = 'hide';
}
But the div is only hidden then, no reflow happens (as would in modern
browsers if you scripted the CSS display property) so whatever layout
space the div had is now simply an empty block.
--
Martin Honnen
http://JavaScript.FAQTs.com/