Click here to Skip to main content
15,884,628 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
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 asp.net 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 onclick=top.window.open 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.
XML
<form id="aspnetForm" name="aspnetForm" action="hos_policies.aspx?a=0" method="post">
<div>
<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="top.window.open ('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>
</img></div>
</div>
</div>
</div>
</div>
</form>


[/Edit]
Posted
Updated 9-Feb-11 9:34am
v2
Comments
Manfred Rudolf 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.

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!
 
Share this answer
 
Hi Janet!

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

<a href="#" onclick="top.window.open ('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.

Cheers!
 
Share this answer
 
The code is perfect except the wired characters.
Please check the pdf path.
 
Share this answer
 
v2

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900