[thelist] FWD: Javascript advice, please

Ben Henick persist1_pdx at yahoo.com
Wed Aug 23 00:43:57 CDT 2000


--- "Daniel J. Cody" <dcody at oracular.com> wrote:
> I've figured out how to do it by reloading the page and not using
> a function, but I want to do it with an onClick event calling a
> function
> 
> which uses document.write....... problem is, when I try this method
> the page itself goes blank, the document.write over-writes everything
> except the headline. Can someone tell me how I can prevent this
> happening?

Well, for IE4 & 5 can change the innerHTML property:

document.all["YourDIVHere"].innerHTML = "yadda yadda headline";

...under most circumstances.

For Netscape your best bet is to build a layer (e.g.
absolutely-positioned DIV) and perform the document.write to that
layer.

<facetiousness>
As Homer J. Simpson would say, "Mmmmmmm.... laay-ers..."
</facetiousness>

I suppose I could also explain how to make NN and IE recognize the same
thing with a single reference, but I'll let that duty devolve to
another soul or another day.



=====
Ben Henick              |  "In the long run, men hit only
Web Author At-Large     |  what they aim at.  Therefore,
www.io.com/persist1/    |  though they should fail
persist1 at io.com         |  immediately, they had better aim
persist1_pdx at yahoo.com  |  high."  --Henry David Thoreau

__________________________________________________
Do You Yahoo!?
Yahoo! Mail - Free email you can access from anywhere!
http://mail.yahoo.com/





More information about the thelist mailing list