无法通过拇指驱动器上保存的超链接打开pdf [英] Can't open pdf from hyperlink saved on thumb drive

查看:70
本文介绍了无法通过拇指驱动器上保存的超链接打开pdf的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个文档去参加可能无法访问互联网的会议(这真是个难题!),所以,我将一些asp.net页面保存到了一个拇指驱动器(使用完整的htm),进行了编辑菜单超链接,因此菜单链接指向拇指驱动器的本地目录.确保将标签图像的css指向本地等.但是,我在页面上有一个超链接,它指向拇指驱动器上的pdf.超链接将不会打开pdf.我尝试了常规的超链接,也尝试了javascript onclick = top.window.open方法,但无法打开它.当我浏览拇指驱动器并直接单击它时,一切都可以正常打开.为了确保我没有做任何真正愚蠢的事情,我将文件名复制到html超链接中.有帮助吗?


好的,顺便说一句,我也尝试了straigh href超链接. residentManual.pdf与文件位于同一根文件夹中.

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?


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>
<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]



[/Edit]

推荐答案

PDF文件在哪里?在根文件夹中?在文件夹下?你错过了一条路吗?

您指定了绝对路径还是相对路径?告诉我们代码人!
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!


嗨珍妮特!

有一个& ouml; (ö)代替 o nclick中的o.那肯定不会起作用.

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>



如果pdf与保存的html位于同一文件夹中,则它应该可以使用.

干杯!



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

Cheers!


除有线字符外,代码非常完美.
请检查pdf路径.
The code is perfect except the wired characters.
Please check the pdf path.


这篇关于无法通过拇指驱动器上保存的超链接打开pdf的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆