moose wrote:
> OK
> Popup window? No problem
> PDF in popup? No problem
>
> But what about a couple of Close Window buttons?
> Imagine a "Close Window" button at the top of the popup page.
> Then the PDF which can scroll. And another "Close Window" button
> at the bottom of the page.
>
> Any suggestions for completing this task?
<a href="loadpdf.cgi?pdf=somefile.pdf"
target="_blank"
onclick="window.open(this.href, this.target,
'..attributes..');return false;"
>Open somefile.pdf in a new window (maybe, if you haven't
disabled that functionality on your browser)</a>
Then have loadpdf.cgi output (using an ASP example, you could use
PHP, or Perl, or JSP, or ColdFusion, or any other server-side
technology for this):
<html>
<head>
<title>Window containing <%= Request.Value('pdf') %></title>
</head>
<body>
<!-- your close buttons and stuff -->
<layer src="<%= Request.Value('pdf') %>"><iframe src="<%=
Request.Value('pdf') %>"></iframe></layer>
<!-- more buttons or whatever -->
</body>
</html>
You probably want some dimensions on the <layer> or <iframe> to make
it bigger than the default size. But remember, the window may not be
the size _you_ specify. Many browsers can honor your window.open()
request but still not provide a window the size, position and with
the chrome you requested.
--
Grant Wagner <>
comp.lang.javascript FAQ -
http://jibbering.com/faq