[Javascript] Detecting existence of windows

Mark Christie MChristie at avsgroup.com
Thu Nov 8 09:52:43 CST 2001


Dear Mikael,
   I have modified my function as you suggested:

function updateconfirm() {
	alert('Your employee information has been updated!');
	window.close();
	if(!window.opener.closed()) {
		window.opener.location.reload();
		window.opener.focus();
	}
	
} 

.reload() worked like a charm...Thank you very much.

.closed(), however, produced the following error:

	A Runtime Error has occurred.
	Do you wish to Debug?

	Line: 32
	Error: Object doesn't support this action.

In debug, the line identified is:
	if(!window.opener.closed()) {

Regards,
   -Mark C.

	

-----Original Message-----
From: Mikael Lindström [mailto:mikael.lindstrom at nipsoft.se]
Sent: Thursday, November 08, 2001 2:38 AM
To: javascript at LaTech.edu
Subject: RE: [Javascript] Detecting existence of windows


It should be

window.opener.location.reload()


Sorry about that

/Mikael

> -----Original Message-----
> From: javascript-admin at LaTech.edu
> [mailto:javascript-admin at LaTech.edu]On
> Behalf Of Mikael Lindström
> Sent: Thursday, November 08, 2001 9:25 AM
> To: javascript at LaTech.edu
> Subject: RE: [Javascript] Detecting existence of windows
>
>
> Aren't you required to keep parentheses in
>
> window.opener.closed() ?
>
> Could it be a fact that IE5.5 manages the missing parentheses
> but IE5.01
> don't ?
>
> And you can use
>
> window.opener.reload()
>
> instead of
>
> window.opener.location = window.opener.location + '';
>
> regards
>
> /Mikael
> > -----Original Message-----
> > From: javascript-admin at LaTech.edu
> > [mailto:javascript-admin at LaTech.edu]On
> > Behalf Of Mark Christie
> > Sent: Wednesday, November 07, 2001 11:39 PM
> > To: 'javascript at LaTech.edu'
> > Subject: [Javascript] Detecting existence of windows
> >
> >
> > Dear List:
> >    I am having a bit of a cross-browser difficulty in the following
> > function:
> >
> > function updateconfirm() {
> > 	alert('Your employee information has been updated!');
> > 	window.close();
> > 	if(!window.opener.closed) {
> > 		window.opener.location = window.opener.location + '';
> > 		window.opener.focus();
> > 	}
> >
> > }
> >
> > This works wonderfully in IE5.5, but IE5.01 does not seem
> to like the
> > .closed property.
> >
> > Basically, I need to check to see if the opener window is
> > still open, and,
> > if it is, refresh it.
> >
> > Am I missing something obvious here?
> >
> > Regards,
> >    -Mark C.
> >
> > _______________________________________________
> > Javascript mailing list
> > Javascript at LaTech.edu
> > http://www.LaTech.edu/mailman/listinfo/javascript
> >
>
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> http://www.LaTech.edu/mailman/listinfo/javascript
>

_______________________________________________
Javascript mailing list
Javascript at LaTech.edu
http://www.LaTech.edu/mailman/listinfo/javascript



More information about the Javascript mailing list