how to open a pdf file from html page? |
how to open a pdf file from html page? |
rrn |
Jul 25 2009, 05:39 AM
Post
#1
|
Novice Group: Members Posts: 21 Joined: 15-April 09 Member No.: 8,330 |
i am creating a website in html page , i want to open a pdf file from my html page..
ie in my website there is a link to location map, wen i click the the 'location map ' , a pdf file should be opened.. tried a lot of ways, pls help me.. html4strict Code: HTML Code: CODE <font color="#0000FF"><p align="center"><a href = 'map.pdf'>Location map</a></p></font> will the above code work??? any help will be appreciated |
Frederiek |
Jul 25 2009, 06:44 AM
Post
#2
|
Programming Fanatic Group: Members Posts: 5,146 Joined: 23-August 06 From: Europe Member No.: 9 |
Yes, only the font color will not be applied to the link. The FONT tag is deprecated in HTML anyway in favor of CSS (Cascading Style Sheets). You can style links in CSS, using pseudo-classes. See Eric Meyer's article at http://meyerweb.com/eric/css/link-specificity.html.
You might want to open the PDF in another window. See the FAQ at http://htmlhelp.com/faq/html/links.html#new-window. |
pandy |
Jul 25 2009, 11:15 AM
Post
#3
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
i am creating a website in html page , i want to open a pdf file from my html page.. ie in my website there is a link to location map, wen i click the the 'location map ' , a pdf file should be opened.. tried a lot of ways, pls help me.. So what happens instead? Do you get some kind of error page? There's nothing wrong with the link, so maybe the URL to the file is wrong. QUOTE html4strict Code: Afraid not. Neither FONT nor 'align' is in HTML Strict. But that doesn't matter for the functionality of your link. |
rrn |
Jul 26 2009, 01:05 AM
Post
#4
|
Novice Group: Members Posts: 21 Joined: 15-April 09 Member No.: 8,330 |
i am creating a website in html page , i want to open a pdf file from my html page.. ie in my website there is a link to location map, wen i click the the 'location map ' , a pdf file should be opened.. tried a lot of ways, pls help me.. So what happens instead? Do you get some kind of error page? There's nothing wrong with the link, so maybe the URL to the file is wrong. QUOTE html4strict Code: Afraid not. Neither FONT nor 'align' is in HTML Strict. But that doesn't matter for the functionality of your link. it is displaying "WEBPAGE CANNOT BE FOUND" |
Frederiek |
Jul 26 2009, 03:53 AM
Post
#5
|
Programming Fanatic Group: Members Posts: 5,146 Joined: 23-August 06 From: Europe Member No.: 9 |
Then the path to map.pdf must be wrong. Is it in the same folder as the html page where you call it from?
Or maybe you have forgotten to upload the pdf? |
Tom H. |
Jul 26 2009, 06:28 AM
Post
#6
|
Advanced Member Group: Members Posts: 129 Joined: 24-August 06 Member No.: 14 |
In your example code, try removing the spaces around the equal sign in your anchor tag, and I recommend double quotes instead of single quotes around the attribute value.
|
Lo-Fi Version | Time is now: 19th April 2024 - 06:42 AM |