Closed Thread Icon

Topic awaiting preservation: Window object (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=8943" title="Pages that link to Topic awaiting preservation: Window object (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: Window object <span class="small">(Page 1 of 1)</span>\

 
Yossi Admon
Bipolar (III) Inmate

From: Israel
Insane since: Nov 2001

posted posted 11-12-2003 20:52

Hi,
Can I get reference to window object (from my domain) only by knowing the window name?



[This message has been edited by Yossi Admon (edited 11-23-2003).]

Yossi Admon
Bipolar (III) Inmate

From: Israel
Insane since: Nov 2001

posted posted 01-20-2004 08:03

I?ve succeeded to get a reference to opened window in the following way:

code:
<HTML>	
<SCRIPT language="javascript">
//var _oChildWin = null;
function doOpen(){
window.open('http://www.yahoo.com', 'newWin');
}
var oChildWin = null;
function doClose(){
try{
oChildWin.close();
} catch(e){}
}

function doCatch(){
try{
oChildWin = window.open('', 'newWin');
} catch(e){}
}
</SCRIPT>
<BODY>
<input type="button" value="Open window by name" onClick="doOpen()">
<input type="button" value="Get window reference by name" onClick="doCatch()">
<input type="button" value="Close opened window" onClick="doClose()">
</BODY>
</HTML>



Anyone knows how to avoid the window from open a new instance in case the window not exists (by name)?
Regards,
Yossi Admon



[This message has been edited by Yossi Admon (edited 01-20-2004).]

« BackwardsOnwards »

Show Forum Drop Down Menu