slammingsammy1
10-17-2010, 08:58 AM
Hi,
is there a way that I can close a browser window with some type of link inside this window? and not via its parent window?
i want to open a window and in it, have a question of yes or no and if a user answers 'no', i would like to close the window, but i can't seem to do so.
so my parent window has codes like this:
<html>
<head><title>test close html</title>
<link rel="stylesheet" href="windowfiles/dhtmlwindow.css" type="text/css" />
<script type="text/javascript" src="windowfiles/dhtmlwindow.js">
/***********************************************
* DHTML Window Widget- © Dynamic Drive (www.dynamicdrive.com)
* This notice must stay intact for legal use.
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/
</script>
</head>
<body>
this is a test html<br/><br/>
<a href="#" onClick="googlewin.hide(); return false">Hide Window 1</a><br/><br/>
<script type="text/javascript">
googlewin=dhtmlwindow.open("googlebox", "iframe", "http://localhost:8080/IRS1098t/test.html", "test closing a dhtml window", "width=700px,height=450px,resize=1,scrolling=1,center=1", "recal")
</script
</body>
</html>
and my test.html looks like this:
<html>
<head><title>test html</title>
</head>
<body>
this is a test html to test closing of the dhtml window<br/><br/>
<a href="#" onClick="googlewin.hide(); return false">Hide Window 1</a><br/><br/>
<a href="javascript:googlewin.hide(); return false">Hide Window 1</a><br/><br/>
<A href="javascript:self.close()">Close this Window using self.close</A><br/><br/>
<a href="javascript:window.opener='x';window.close();">Close using window.opener</a>
</body>
</html>
as you can see, i'm trying several methods to close it but no luck.
any help would be greatly appreciated!
thank you.
is there a way that I can close a browser window with some type of link inside this window? and not via its parent window?
i want to open a window and in it, have a question of yes or no and if a user answers 'no', i would like to close the window, but i can't seem to do so.
so my parent window has codes like this:
<html>
<head><title>test close html</title>
<link rel="stylesheet" href="windowfiles/dhtmlwindow.css" type="text/css" />
<script type="text/javascript" src="windowfiles/dhtmlwindow.js">
/***********************************************
* DHTML Window Widget- © Dynamic Drive (www.dynamicdrive.com)
* This notice must stay intact for legal use.
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/
</script>
</head>
<body>
this is a test html<br/><br/>
<a href="#" onClick="googlewin.hide(); return false">Hide Window 1</a><br/><br/>
<script type="text/javascript">
googlewin=dhtmlwindow.open("googlebox", "iframe", "http://localhost:8080/IRS1098t/test.html", "test closing a dhtml window", "width=700px,height=450px,resize=1,scrolling=1,center=1", "recal")
</script
</body>
</html>
and my test.html looks like this:
<html>
<head><title>test html</title>
</head>
<body>
this is a test html to test closing of the dhtml window<br/><br/>
<a href="#" onClick="googlewin.hide(); return false">Hide Window 1</a><br/><br/>
<a href="javascript:googlewin.hide(); return false">Hide Window 1</a><br/><br/>
<A href="javascript:self.close()">Close this Window using self.close</A><br/><br/>
<a href="javascript:window.opener='x';window.close();">Close using window.opener</a>
</body>
</html>
as you can see, i'm trying several methods to close it but no luck.
any help would be greatly appreciated!
thank you.