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.

Like it on Facebook, Tweet it or share this article on other bookmarking websites.

Comments (0)

There are no comments posted here yet

Does Anna Hazare get the result of his hunger strike?

Anna Hazare the p[perfect Indian who is fighting for lokpal bill to be implemented finally succeded in getting it to the notice of the government hrough the hunger strike. Though government laid a ccommittee to discuss about it, do yyou think that it would get implemented? If not why?
No answer selected. Please try again.
Please select either existing option or enter your own, however not both.
Please select minimum 0 answer(s) and maximum 5 answer(s).
/polls/politics/6034-does-anna-hazare-get-the-result-of-his-hunger-strike.json?task=poll.vote
6034
checkbox
[{"id":"20818","title":"Because it will reveal the bleady politicians black money","votes":"29","type":"x","order":"0","pct":34.94,"resources":[]},{"id":"20819","title":"it will make them weak regarding the corruption","votes":"27","type":"x","order":"0","pct":32.53,"resources":[]},{"id":"20820","title":"It will make them not to earn more and more money","votes":"10","type":"x","order":"0","pct":12.05,"resources":[]},{"id":"20821","title":"because their swiss accounts will open","votes":"7","type":"x","order":"0","pct":8.43,"resources":[]},{"id":"20822","title":"A true politician will get a chance to contest","votes":"10","type":"x","order":"0","pct":12.05,"resources":[]}] ["#ff5b00","#4ac0f2","#b80028","#eef66c","#60bb22","#b96a9a","#62c2cc"] ["rgba(255,91,0,0.7)","rgba(74,192,242,0.7)","rgba(184,0,40,0.7)","rgba(238,246,108,0.7)","rgba(96,187,34,0.7)","rgba(185,106,154,0.7)","rgba(98,194,204,0.7)"] 350
bottom 200
No married couple wants to end up getting divorced. It is not like they have planned for it. They try to put up with their partners for as long as they
Due to our modern lifestyle, we feel that digestion related disorders are a common problem. Thus, we neither give importance to them nor seek any help
The bond of marriage brings the two people together. Initially, everything may seem okay and both of them slowly start discovering each other in the journey.
Why to choose Java? In the computer market, being able to use Java is a crucial knowledge. Java is a development terminology used to build compelling
DATABASE CONNECTIVITY This articles explains the need of database connectivity, the way it is achieved through Java using the JDBC(java database connectivity)
  Write your first simple java program.   First of all we need is a placewhere we can write your Java code. All Java programs are written using
Array of objects in Java Arrays are defined as block of continous memory locations which are arranged in one after another. Elements of the Array can
Synchronized block is alternative mechanism for "synchronized" methods.If we inherihate the non synchronized blocks either from base class or interface