title: how to open a pdf file in a popup window with jquery
body: <p>My code throws a JS error, offsetParent is not set -- cannot scroll. I tried <code>position: relative;</code> but it still shows the same error.</p>
  
  <pre><code>&lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script src="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.9/jquery-ui.js" type="text/javascript"&gt;&lt;/script&gt;
  &lt;link href="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.9/themes/blitzer/jquery-ui.css" rel="stylesheet" type="text/css" /&gt;
  &lt;script type="text/javascript"&gt;
      $(document).ready(function() {
          $('#btnShow').click(function(){
              $("#dialog").dialog();
          }); 
      });                  
  &lt;/script&gt;
  
  &lt;a href="#" id="trigger"&gt;this link&lt;/a&gt;
  &lt;div id="dialog" style="display: none; position: relative; height: 4em; overflow: scroll;"&gt;
      &lt;div&gt;
          &lt;iframe src="reports/my_pdf.pdf"&gt;&lt;/iframe&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>