N
Nag
Consider this example..
I have a pdf file which is embedded in the browser and I have a
download link which is used to download that pdf file. When I click on
the download link, it is not functioning since it is the same url as
the embedded pdf and because the adobe reader is already there in the
browser it will automatically opens or the embedded pdf will goes off.
To prevent this scenario, we can use a mechanism. First create a
hidded iFrame in the same window using the following code..
<iframe style="DISPLAY: none" name="iframe1" src="">
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="..." target="iframe1">Download</a>
This will solve the problem. However this method will not work with
Internet Explorer. For IE we can use another method and that method
can be choosen automatically by the browser.
More java tips @ http://sourcecentral.blogspot.com
I have a pdf file which is embedded in the browser and I have a
download link which is used to download that pdf file. When I click on
the download link, it is not functioning since it is the same url as
the embedded pdf and because the adobe reader is already there in the
browser it will automatically opens or the embedded pdf will goes off.
To prevent this scenario, we can use a mechanism. First create a
hidded iFrame in the same window using the following code..
<iframe style="DISPLAY: none" name="iframe1" src="">
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="..." target="iframe1">Download</a>
This will solve the problem. However this method will not work with
Internet Explorer. For IE we can use another method and that method
can be choosen automatically by the browser.
More java tips @ http://sourcecentral.blogspot.com