Note that there are some explanatory texts on larger screens.

plurals
  1. POPDF viewer in Asp.Net
    text
    copied!<p>I have a list of documents at server. and want to develop a page where the list of documents will be displayed as hyperlinks in left panel/div and while click on a link. the right panel displays the corresponding PDF document from server.</p> <p>can anybody help me out to develop the same using jquery or javascript?</p> <p>thanks in advance</p> <p>i tried below code based on some articles i read Script :</p> <blockquote> <pre><code>&lt;script language="javascript" type="text/javascript"&gt; function previewPdf(url, target) { var div = document.getElementById(target); var obj = document.createElement("&lt;embed style='width:939px; height:736px;' frameborder='0' src='" + url +"')&gt;&lt;/embed&gt;"); div.appendChild(obj); } &lt;/script&gt; </code></pre> </blockquote> <p>Body :</p> <pre><code>&lt;body style="height: 741px"&gt; &lt;form id="form1" runat="server"&gt; &lt;div id="div1" style="float:left; width: 20%; text-align: left; height: 100%; border-width:2px;"&gt; &lt;button onclick="previewPdf('Documents/Accomodation.pdf','div2')"&gt;Accomodation&lt;/button&gt; &lt;br /&gt; &lt;button onclick="previewPdf('Documents/Insurance.pdf','div2')"&gt;Insurance&lt;/button&gt; &lt;br /&gt; &lt;button onclick="previewPdf('Documents/Air Ticket.pdf','div2')"&gt;Air Ticket.pdf&lt;/button&gt; &lt;br /&gt; &lt;/div&gt; &lt;div id="div2" style="float:right;width: 80%; text-align: left; height: 100%; border-color:Maroon"&gt; &lt;/div&gt; &lt;/form&gt; &lt;/body&gt; </code></pre> <p>but it doesnt replace the 'div2' with the content[pdf].</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload