[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:
>I have a problem in writing HTML to a new window. I have got the following
><script language="LiveScript">
>function windowOpener() {
>   msg=open("","DisplayWindow","toolbar=no,directories=no,menubar=no");
>   msg.document.write("Hi");
>   }
>// -->
>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
>you can display them when using the <center>tag. This is really strange. 

You need to append a 


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