checking for window existance

L

Lambuz

Is there any way to check the existance of a window by the name ?

I'm using this code:
window.open("http://www.google.com",'targetWin1')

If I open a window using previous code without getting immediatly
return value of open method, can I get it in a second moment ? For
example using the value of param sName of open method ?

regards
 
?

=?ISO-8859-1?Q?G=E9rard_Talbot?=

Lambuz wrote :
Is there any way to check the existance of a window by the name ?

No.


I'm using this code:
window.open("http://www.google.com",'targetWin1')

If I open a window using previous code without getting immediatly
return value of open method,

If there is no return value, then it means the function did not succeed
and the window does not exist.
can I get it in a second moment ?

I don't understand what you mean.

For
example using the value of param sName of open method ?

regards

Look for WindowObjectReference
and in the FAQ :
http://developer.mozilla.org/en/docs/DOM:window.open#FAQ

Gérard
 
J

Jim Michaels

Lambuz said:
Is there any way to check the existance of a window by the name ?

I'm using this code:
window.open("http://www.google.com",'targetWin1')

sort of.
var w=window.open("http://www.google.com",'targetWin1')
if (null==w) {
//oops. no window - must have been killed by a popup blocker.
} else {
//yay. got a window
}
do something with w
w.close();
window.focus();
If I open a window using previous code without getting immediatly
return value of open method, can I get it in a second moment ? For
example using the value of param sName of open method ?

I don't understand. second moment? what sName? you must be reading out of
some book.
in english?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top