Reputation: 131
I have a webpage that show me some pdf uploaded previously, but I want that when I click on their link, open it into a named div.
My code:
<div class='row'>
<div class='col'>
<a href='pdf1.pdf'>pdf1</a>
<br/>
<a href='pdf2.pdf'>pdf2</a>
</div>
<div class='col' id='preview'>OPEN PDF PREVIEW</div>
</div>
If I click on "pdf1" or "pdf2" my two files may open into div with id PREVIEW
I've tried with some jquery functions, without luck.
Upvotes: 1
Views: 786
Reputation: 231
If you want to open a link in an iframe, try to use target="iframeName", as seen at W3C.
Upvotes: 0
Reputation: 5492
You can do as follow:
<iframe src="http://docs.google.com/gview?url=http://example.com/mypdf.pdf&embedded=true" style="width:718px; height:700px;" frameborder="0"></iframe>
you just have to pass your pdf path to url
Upvotes: 1