/    Sign up×
Community /Pin to ProfileBookmark

How to make PDF reader by side

Hello, this is my first post so sorry if I make any mistakes.

I would like to make something like this.

[url]http://tinypic.com/r/2ezpoiu/8[/url]

On the left side are listed all the pdfs for example book1 book2 and book3, when you click on book2 i want that it loads to the right side of the screen. I know how to make it load in new tab, but i want that it loads on the same page. If anyone knows I would be thankful for help.

to post a comment
HTML

3 Comments(s)

Copy linkTweet thisAlerts:
@Kevin2Dec 03.2014 — A very crude idea:
[code=html]<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Books</title>
<style>
iframe {overflow: auto;}
nav, main {display: inline-block; vertical-align: top;}
</style>
</head>
<body>
<h1>My PDF Books</h1>
<div id="container">
<nav>
<a href="book1.pdf" target="display">Book 1</a><br>
<a href="book2.pdf" target="display">Book 2</a><br>
<a href="book3.pdf" target="display">Book 3</a>
</nav>
<main>
<iframe id="display" name="display"></iframe>
</main>
</div>
</body>
</html>[/code]


Play with the styles to get what you want.
Copy linkTweet thisAlerts:
@flyskyauthorDec 04.2014 — http://www.codecademy.com/logical.bih/codebits/qoh2eZ

I tried that... seems like my script is not working

Your code when i change the href at <a> (i change it to with a link for pdf file) and when i click it it opens me in new tab, but not at the same website.

Thx for answering, i am noob at websites ?
Copy linkTweet thisAlerts:
@Kevin2Dec 04.2014 — [code=html]<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Books</title>
<style>
iframe {overflow: auto; border: 0; width: 800px; height: 550px;}
nav, iframe {display: inline-block; vertical-align: top;}
</style>
</head>
<body>
<h1>My PDF Books</h1>

<nav>
<a href="http://prawnpdf.org/manual.pdf" target="display">Book 1</a><br>
<a href="http://manuals.info.apple.com/MANUALS/1000/MA1565/en_US/iphone_user_guide.pdf" target="display">Book 2</a>
</nav>

<iframe id="display" src="http://prawnpdf.org/manual.pdf" name="display"></iframe>

</body>
</html>[/code]

No scripting, no jQuery. Works in IE11, Firefox, Chrome.
×

Success!

Help @flysky spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.6,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...