Click here to Skip to main content
13,088,305 members (52,869 online)
Rate this:
Please Sign up or sign in to vote.
See more:
I've got a doc going to a conference where there may not be internet access (egads, you say!) So, I saved a few pages to a thumb drive (using the full htm), edited the menu hyperlinks so the menu links pointed to the thumb drive's local directory. Made sure the css for the tab images pointed locally, etc. But, I have a hyperlink on a page to a pdf on the thumb drive. The hyperlink will NOT open the pdf. I've tried a regular hyperlink, I've also tried the javascript approach and can't get it to open. When I browser the thumb drive and click it directly, everything opens fine. Just to be sure I hadn't done anything really stupid, I copied the name of the file into the html hyperlink. Any help?

[Edit - Moved OPs answer here - Henry]
Okay, BTW I also tried the straigh href hyperlink. residentManual.pdf is in same root folder as file.
<form id="aspnetForm" name="aspnetForm" action="hos_policies.aspx?a=0" method="post">
<div id="maincontainer">
<div id="contentwrapper">
<div id="contentcolumn">
<div class="contentinnertube">
<h1>Graduate Medical Education</h1>&lt;img id="ctl00_ContentPlaceHolder1_Image3" style="BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid; BORDER-LEFT: 1px solid; BORDER-BOTTOM: 1px solid" alt="Resident Photo" src="hos_policies_files/photoFHCPeds.jpg" align="right"&gt;
<a href="#" önclick=" ('residentManual.pdf','800x300','toolbar=no,scrollbars=yes,resizable=yes,status=no,location=no,menubar=no,directories=no,width=800,height=300')">Resident Manual  (pdf)</a>

Posted 9-Feb-11 9:04am
Updated 9-Feb-11 9:34am
Henry Minute225.7K
Manfred R. Bihy 9-Feb-11 15:11pm
It would help tremendously if you posted the relevant saved HTML that contains said link to that ominous PDF. If it ain't to big I'd say post all of it, but the interesting bits shouldn't be more than 30 lines though. So you should try to make a cut down copy of what you have that suffices to reproduce your issue.
Henry Minute 9-Feb-11 15:35pm
OP has responded. I have moved their answer into the question.
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Where is the PDF file? In the root folder? deep under folder? Did you miss a path?

Did you specify absolute or relative path? Show us the code man!
Rate this: bad
Please Sign up or sign in to vote.

Solution 3

Hi Janet!

There is a &ouml; (ö) instead of the o in onclick. That will not definitely not work.

<a href="#" onclick=" ('residentManual.pdf','800x300','toolbar=no,scrollbars=yes,resizable=yes,status=no,location=no,menubar=no,directories=no,width=800,height=300')">Resident Manual  (pdf)</a>

You might want to try this though:

<a href="./resident.pdf" target="pdf">Resident Manual</a>

If the pdf is in the same folder as the saved html it should work.

Rate this: bad
Please Sign up or sign in to vote.

Solution 4

The code is perfect except the wired characters.
Please check the pdf path.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web02 | 2.8.170813.1 | Last Updated 9 Feb 2011
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100