[thelist] PDF page with close button, maybe using frames? was Re: PDF page with close button

Michael Sprague fuzzy2k at pacbell.net
Wed Apr 5 14:39:00 CDT 2006


Yes.  Even though there is a Perfectly Reasonable Close Button in the Top Right, or in a few isolated cases, Top Left corner of the browser window.  
   
  I have given up trying to understand why those easy options are too much for some people to grasp.
  
thelist-request at lists.evolt.org wrote:
    ------------------------------
Subject: Re: [thelist] PDF page with close button

Even though there is a close button in the top right-hand corner of the
browser window?


Have you got access to a server-side scripting technology? If so, you
could specify an id for each PDF, and then display the appropriate PDF
according to the id. So, your anchor tag would look something like the
following:


The file pdfFrame.asp (or php, or whichever technology you're using)
would then have some logic along the following lines:

// Get id from querystring
// Find pdf filename for id from data structure (text file, database,
array etc.)
// Output HTML, including the correct PDF file path as a frame src
attribute value

It would be possible using similar logic to that shown above, but you
would have to work very hard to make it accessible. Instead of
outputting the HTML, though, you could use the DOM to change the value
of the src attribute of the frame to reflect the path to the PDF. Ensure
that you do not allow XSS exploits if you take this route
.

Personally, I would argue that (IMHO) a PDF is not a webpage, and trying
to treat it as such will lead to nothing but woe. Don't forget that a
system like this will only work for browsers that are configured to
display a PDF, the rest will only offer a download anyway.
  
If I had access to asp or php in this environment, then I would not be doing this page- they would give it to someone with knowledge of those environments.
   
  Thanks for the response.  I will keep looking.


Michael Sprague 
  310.497.7850 c
  608.541.6532 fax
   
  Serving the interweb since 1995.



More information about the thelist mailing list