|
|
Subject:
PDF - Closing a browser window from a pdf file.
Category: Computers > Programming Asked by: hlf-ga List Price: $25.00 |
Posted:
03 Oct 2005 15:22 PDT
Expires: 05 Oct 2005 09:45 PDT Question ID: 575964 |
The scenario: A PDF file is opened in a separate browser window. The problem: How to create a link (image or text) in the PDF file using either javascript or html to close the window to return to the parent page. In the PDF file, I tried using the javascript link action with javascript:window.close(); and go to web page action http://www.website.dom target="_top" Neither works. I am certain this must have been done lots of times but I have been unable to find a solution. |
|
There is no answer at this time. |
|
Subject:
Re: PDF - Closing a browser window from a pdf file.
From: matthendrix-ga on 04 Oct 2005 23:43 PDT |
Try opening the PDF files in a new "framed" window, in the top frame put your javascript commands in a button. In the bottom frame have your PDF load. Create an link to your framed page like this: <a href="pdf_in_frames.html?file=myfile.pdf">Click Here</a> Now in the recieving frames page (in the bottom frame) put some javascript that gets the query string and loads the PDF. See below. <script> window.location.href=window.location.search.substring(window.location.search.indexOf('=')+1); </script> Try it, it works. |
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. |
Search Google Answers for |
Google Home - Answers FAQ - Terms of Service - Privacy Policy |