質問

I have a .html file that has three frames inside. One is a "title" frame, another is a "menu" frame and the last is a "target" frame, set at first to be blank (just an empty .html page). Whenever someone presses a link in the menu frame, I want that link to be opened inside the target frame. The problem is that it doesn't work with pdf files! The link is a pdf file I've uploaded to my dropbox, and can be viewed there without any problems (not just from my dropbox account, from any account/even without one), but it just wouldn't open in the target frame! It just doesn't change the target frame, as if nothing happened.

Is it a problem with dropbox? or with pdf files in general?

index.html

<html>
<head>
<title>  2014 </title>
<frameset rows="100,*" frameborder="0" border="0" framespacing="0">
<frame name="top" src="title.html">
<frameset cols="200,*" frameborder="0" border="0" framespacing="0">
<frame name="menu" src="content.html" marginheight="0" marginwidth="0" scrolling="auto" noresize>
<frame name="lecturesWindow" src="blank.html" marginheight="0" marginwidth="0" scrolling="auto" noresize>
<noframes>
<p>This section (everything between the 'noframes' tags) will only be displayed if the users' browser doesn't support frames. You can provide a link to a non-frames version of the website here. Feel free to use HTML tags within this section.</p>
</noframes>
</frameset>
</frameset>
</head>
<body>
</body>
</html>

title.html

<html>
<head>
</head>
<body>
<center> 
<br>
<h1><u> Title 1234 </u> </h1>
<br>
</center>
</body>
</html>

menu

<html>
<head>
</head>
<body>
<center> 
&#9679; The file can be found here: <a href="https://www.dropbox.com/....*.pdf" target="lecturesWindow"> link </a>
</center>
</body>
</html>

Thanks!

役に立ちましたか?

解決

You can use the Google Docs viewer in a frame: https://docs.google.com/viewer

他のヒント

Dropbox serve files with an x-frame-options: SAMEORIGIN header which bans browsers from displaying them in frames on other sites.

Don't try to use Dropbox to host the static files for your website. They don't like it and they take steps to prevent it.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top