[Javascript] Handling child window visibility...

Matt Barton javascript at mattbarton.org
Thu Aug 12 09:52:36 CDT 2004


The first thing which popped into my head would be to put this into the
second page ...

<!-- ******************* -->
<script language="javascript" for="window" event="onload">
    window.focus ();
</script>
<!-- ******************* -->

Try it - not sure, but it should do the job.

Matt

----- Original Message ----- 
From: "Shawn Milo" <ShawnMilo at runbox.com>
To: <javascript at LaTech.edu>
Sent: Thursday, August 12, 2004 3:40 PM
Subject: [Javascript] Handling child window visibility...


I have a form which has a target attribute.  This way,
when someone clicks the submit button on a page which
 contains a Java graph applet, a new window opens with
a table of statistics based upon the data in the chart.

If the window is already open, it will simply refresh.
 This is fine, but my concern is that if the new window
 is in the background, users will fail to realize this, click
 repeatedly, then call me for help.

I have thought of two options.  The first is (if possible)
 to check for the existance of the window during onclick
 and close it.  The second is to put JavaScript in the
 onload of the new window to bring it to the top.

Are either of these possible, and are either
 of these recommended?  Any other solutions?

I am not creating this window with JavaScript by
 using window.open() or anything -- 
just a normal HTML form with target="statWindow"
 in the declaration.

Thanks,
Shawn
_______________________________________________
Javascript mailing list
Javascript at LaTech.edu
https://lists.LaTech.edu/mailman/listinfo/javascript

-- 
This email has been verified as Virus free
Virus Protection and more available at http://www.plus.net




More information about the Javascript mailing list