Click to See Complete Forum and Search --> : netscape layers question


eewald
05-12-2003, 09:34 AM
I have an image in an html page. I am currently using the outerHTML property of IE to replace that entire image with a paragraph. I'm trying to do the same thing in Netscape using the layers property.

I defined my layer in the html as:

<LAYER id="inbox">
<img border=0 width=192 height=138 id="_x0000_i1027" src="myimage.jpg" name=visimg NOSEND=1>
</LAYER>


And the code I'm trying to modify it with is:

document.inbox.document.write("<P> SOME TEXT </P>");

Do you have to define a location for the layer? If so, I have a problem in that I need to use this code for multiple html's where I won't know the location it needs to be in.

Any help would be very appreciated.. thanks in advance!

Jona
05-12-2003, 11:01 AM
document.inbox.document.open();
document.inbox.document.write("<P> Text goes here </P>");
document.inbox.document.close();

If the above only appends (adds to) the already existing picture, try this:

document.inbox.document.open();
document.inbox.document.clear();
document.inbox.document.write("<p> Text goes here</p>");
document.inbox.document.close();

eewald
05-12-2003, 12:25 PM
:o thanks!

Jona
05-12-2003, 12:25 PM
Yeah, it's no problem.... (I don't even have Netscape 4.x yet! LOL)