Open Means Open Means
I have a PDF file embedded with the page and I have a download link which is used to download that pdf file. When I click on the download link, it will not work since it is the same url as with the embedded pdf; and because the adobe reader is already loaded in the browser it will automatically opens in a new window and the embedded pdf will be unloaded.

To prevent this scenario, we can use the following mechanism. First create a hidded iFrame in the same window using the following code.
<iframe style="DISPLAY: none" src="/" name="iframe1"></iframe>;
Now make a small change to your download link so that the url target is pointing to the hidden frame as shown below..
<a href="http://www.yoursite.com/..." target="iframe1">Download</a>
This will solve the problem. However this method has not been tested with the browsers other than Internet Explorer, Firefox and Netscape.

No comments

Login to post a comment

Show
  • Create an account
  • Forgot your username?
  • Forgot your password?

Related Articles

  • Shell Script to demonstrate functions
  • Shell Script to Check File Permissions
  • Earn money by posting links
  • Know When Do You Have To Sell Your Mutual Funds
  • Credit Cards - Points to remember
  • HTML Basics - Formatting Tags
  • Quick Starter Guide To JavaServer Faces (JSF)
  • Java Puzzle - Problem of Two Developers
  • Java Puzzle - Problem of Two Developers Part 2
  • Adsense High Paying Keywords
  • About Us
  • Faqs
  • Contact Us
  • Disclaimer
  • Terms & Conditions