473,395 Members | 1,456 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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?
Jul 8 '12 #1

✓ answered by ariful alam

You can try the following code:

Expand|Select|Wrap|Line Numbers
  1. <a href='javascript:var win=window.open(); win.document.write("<iframe id=pdf_file src=05.pdf width=450px height=456px></iframe>");'>Book</a>
  2.  

1 3082
ariful alam
185 100+
You can try the following code:

Expand|Select|Wrap|Line Numbers
  1. <a href='javascript:var win=window.open(); win.document.write("<iframe id=pdf_file src=05.pdf width=450px height=456px></iframe>");'>Book</a>
  2.  
Jul 8 '12 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: marty | last post by:
I have a webpage that displays data from a SQL database in table format. I found information on how to create a way to allow a user to download this information to Excel using 'Header()' in the...
12
by: Neil | last post by:
I previously posted re. this, but thought I'd try again with a summary of facts. I have an Access 2000 MDB with a SQL Server 7 back end. There is a view that is linked to the database via ODBC...
8
by: W. de Jonge | last post by:
Who can help me? I want to create a link(href) which opens an .doc or an ..xls directly in MS Word or MS Excell and not in IE so that I don't have to save the document first en open it from...
20
by: Neil | last post by:
I have an Access 2000 MDB file with a SQL 7 back end. I have a main table with 50,000 records; and I have a selections table with 50,000 records for each machine that uses the database (about...
6
by: Paolo Pignatelli | last post by:
I have an aspx code behind page that goes something like this in the HTML view: <asp:HyperLink id=HyperLink1 runat="server" NavigateUrl='<%#"mailto:" &amp;...
4
by: Arif | last post by:
I entered 5 records and closed the database, however, when I reopen to start data entry it starts from the first record. This posses a risk that mistakenly the entry operator may overwrite data. Is...
0
by: tedqn | last post by:
I have a gridview page that returns result base on submitted search criteria. Each result has a link to view the details of an item, which will take user away from the current page to the detail...
0
by: Saiteckpec | last post by:
Hai, I need a help, now i am doing project in C#.net it is same like as address book in that user want to click the email id the link passed to Outlook express.any one know means pls help
5
by: siddhartha92k | last post by:
sir ,i want to download win millenium through internet but i use google and google can not give any link about millenium so if you can give any download link about millinum os then please provide...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.