Click here to Skip to main content
15,892,643 members

Can't open pdf from hyperlink saved on thumb drive

janetb99 asked:

Open original thread
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]
Tags: HTML, PDF

Plain Text
ASM
ASP
ASP.NET
BASIC
BAT
C#
C++
COBOL
CoffeeScript
CSS
Dart
dbase
F#
FORTRAN
HTML
Java
Javascript
Kotlin
Lua
MIDL
MSIL
ObjectiveC
Pascal
PERL
PHP
PowerShell
Python
Razor
Ruby
Scala
Shell
SLN
SQL
Swift
T4
Terminal
TypeScript
VB
VBScript
XML
YAML

Preview



When answering a question please:
  1. Read the question carefully.
  2. Understand that English isn't everyone's first language so be lenient of bad spelling and grammar.
  3. If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome.
  4. Don't tell someone to read the manual. Chances are they have and don't get it. Provide an answer or move on to the next question.
Let's work to help developers, not make them feel stupid.
Please note that all posts will be submitted under the http://www.codeproject.com/info/cpol10.aspx.



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