[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Writing HTML to new window?
At 12:04 PM 2/4/96 EST, you wrote:
>Hi,
>
>I have a problem in writing HTML to a new window. I have got the following
code:
>
><script language="LiveScript">
><!--
>function windowOpener() {
> msg=open("","DisplayWindow","toolbar=no,directories=no,menubar=no");
> msg.document.write("Hi");
> }
>// -->
></script>
>
>The browser won't write Hi. If I put it into <h1>tags it works fine. Or is this
>just another nasty bug? Displaying images is also a problem but I found out
that
>you can display them when using the <center>tag. This is really strange.
You need to append a
msg.document.close();
to close the stream. This is necessary for any output that doesn't cause a
new line or paragraph in
the browser (with <H1> does). There are also some font formatting tags you
can use. If you don't
want to close the output stream the simplest approach of all is to add a <P>
after the text, as in
msg.document.write ("Hi<P>");
-- Gordon