Closing pdf poup using javascript

B

Balaji

I have a requirement to close the popup which has a pdf.I am not able
to get the handle for the window after it has opened a pdf.
I would like to get the handle and close it. Is there a way to do that.
I do not want a solution using iframe / frames

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
<script language="javascript">
<!--

var WinHandle;

function openpopup() {
WinHandle=window.open('1.pdf');
}

function ClosePoup(){
WinHandle.close();
}
}
//-->
</script>
</head>

<body bgcolor="#FFFFFF" text="#000000"
onUnload="javascript:ClosePoup();">
<a href="javascript:eek:penpopup();">Open Popup</a>
</body>

</html>
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top