Re: JS: How to re-write to an open window

by "Cyanide _7" <leo7278(at)hotmail.com>

 Date:  Sat, 08 Jan 2000 07:56:26 CST
 To:  niclas(at)ducati.org
 Cc:  hwg-languages(at)hwg.org
  todo: View Thread, Original
you are remembering to close the document after writting to it, aren't you? 
you need to close the document's stream to *finalize* it. then when you next 
write to it, it will clear itself first:

myWin.document.write("foobar");
myWin.document.close();

- Cyanide_7


>From: "Niclas Cederlund" <niclas(at)ducati.org>
>Reply-To: <niclas(at)ducati.org>
>To: "Hwg-Languages" <hwg-languages(at)hwg.org>
>Subject: JS: How to re-write to an open window
>Date: Sat, 8 Jan 2000 14:02:03 +0100
>
>Hi,
>
>I have a script that opens up a window, writes some HTML (the basic tags, 
>plus sets fonts and
>background color) and loads an image into it. works nice.
>
>But, if I click on another link (on the page that has the 
>openwindow-script) that shall open the
>same window (but with another image) *and* I have the window open already, 
>then of course it writes
>the same tags again, leaving the 2st image and just appending the 2nd one.
>
>How do I prevent this from happen? I want to have everything rewritten in 
>the open window, so that
>only one image is shown.
>
>TIA
>~ Mr NiCe ~
>Ducati 750 F1 '85, bimota db2sr '93
>

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com

HWG: hwg-languages mailing list archives, maintained by Webmasters @ IWA