How to give link for pdf download and view which opens in new tab??

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • karimkhan
    New Member
    • Jan 2011
    • 54

    #1

    How to give link for pdf download and view which opens in new tab??

    I am using this code :

    <iframe runat="server" id="pdf_file" src="doc.pdf" width="450px" height="456px"
    enableviewstate ="True" visible="True"> </iframe>


    to show pdf in my browser, but i want to give link for list of PDFs link like :

    1. Chemistry
    2. Physics
    3. Math

    When I click on these link that pdf should be opened in new tab in same browser, how to do this?
  • ariful alam
    New Member
    • Jan 2011
    • 185

    #2
    You can try the following code:

    Code:
    <a href='javascript:var win=window.open(); win.document.write("<iframe id=pdf_file src=05.pdf width=450px height=456px></iframe>");'>Book</a>

    Comment

    Working...