Tuesday, September 22, 2009

Javascript code for opening the popup and close the parent window without confirm prompt menu in html

BlankJavascript code for opening the popup and close the parent window
without confirm prompt menu in html

-------

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>

<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<script>
function openWindow(){
var browser=navigator.appName;
if (browser=="Microsoft Internet Explorer"){
window.opener=self;
}
window.open('popup.html', 'null',
'width=900,height=750,toolbar=no,scrollbars=no,location=no,resizable =yes');
window.moveTo(0,0);
window.resizeTo(screen.width,screen.height-100);
//parent.close(); //Closing on the child
}
</script>

</head>
<body onload="window.open('','_parent','');openWindow()">

<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td>If the window does not open, please turn off the pop-up blocker for this
site and <a href="#"
onClick="window.open('','_parent','');openWindow()"><u>click
here</u></a></td>
</tr>
</table>
</body>
</html>
---------

1 comment:

JavaScriptBank.com said...

very cool & good code, thank you very much for sharing.

Can you share this JS code on my JavaScript library?


Awaiting your response. Thank

Adobe News