Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #37037

Re: Clearing/Writing a daughter window ?

From "R.Wieser" <address@not.available>
Newsgroups comp.lang.javascript
Subject Re: Clearing/Writing a daughter window ?
Date 2019-08-04 09:47 +0200
Organization Aioe.org NNTP Server
Message-ID <qi62jn$1v7f$1@gioia.aioe.org> (permalink)
References <2e2a80c3-e3bb-4e10-8be1-48c21f76f441@googlegroups.com>

Show all headers | View raw


John,

> Other than closing Wndw and opening another Wndw,
> is there something that I can put as position X to restore
> Wndw to the freshly-opened state?

As far as I can tell you can remove all elements from the page.   But that 
won't clear variables ...

In JS it goes like this (executed on the page itself.  I assume that 
replacing "document" with your "WindW" will access your "daughter window". 
But if not try "WindW.document"  ):

aElements = document.children
for (var i=aElements.length;i--;i>=0) 
aElements[i].parentNode.removeChild(aElements[i]);

(notice the for loop starting from the end and decrementing 
upto-and-including zero)

It clears all direct children, in with it the childrens contents too. 
Should take just two steps (header and body elements).

No idea as how to translate that to VBS though. Sorry.

Regards,
Rudy Wieser

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Clearing/Writing a daughter window ? dr.j.r.stockton@gmail.com - 2019-08-03 10:46 -0700
  Re: Clearing/Writing a daughter window ? "R.Wieser" <address@not.available> - 2019-08-04 09:47 +0200
  Re: Clearing/Writing a daughter window ? JJ <jj4public@vfemail.net> - 2019-08-06 00:32 +0700
    Re: Clearing/Writing a daughter window ? dr.j.r.stockton@gmail.com - 2019-08-06 04:13 -0700
      Re: Clearing/Writing a daughter window ? JJ <jj4public@vfemail.net> - 2019-08-07 21:27 +0700
    Re: Clearing/Writing a daughter window ? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2019-08-08 15:00 +0200

csiph-web