title: jpegcam in jquery modal dialog
body: <p>I'm trying to use jpegCam wiht jquery. I tried to use jquery modal dialog to open jpegcam window but there is a problem with <code>document.write( webcam.get_html(320, 240) );</code> .</p>
  
  <p>here is example of my code:</p>
  
  <pre><code>    &lt;fieldset&gt;
      &lt;legend&gt;scan&lt;/legend&gt;
      &lt;table&gt;
      &lt;tr&gt;
      &lt;td&gt;
      &lt;script language=\"JavaScript\"&gt;
          webcam.set_api_url( 'core/img_upload/_php_upload_doc_img.php' );
          webcam.set_quality( 99 ); // JPEG quality (1 - 100)
          webcam.set_shutter_sound( true ); // play shutter click sound
      &lt;/script&gt;
      &lt;div id='web'&gt;
      &lt;script language=\"JavaScript\"&gt;
  
      document.write( webcam.get_html(320, 240) );
  
      &lt;/script&gt;
      &lt;/div&gt;
      &lt;/td&gt;
      &lt;td&gt;
  
      &lt;script language=\"JavaScript\"&gt;
          webcam.set_hook( 'onComplete', 'my_completion_handler' );
  
          function take_snapshot() {
              // take snapshot and upload to server
              document.getElementById('upload_results').innerHTML = '&lt;p&gt;uploading...&lt;/p&gt;';
              webcam.snap();
          }
  
          function my_completion_handler(msg) {
              // extract URL out of PHP output
              if (msg.match(/(https\:\/\/\S+)/)) {
                  var image_url = RegExp.$1;
                  // show JPEG image in page
                  document.getElementById('upload_results').innerHTML = 
                      '&lt;img src=\"' + image_url + '\"&gt;';
  
                  // reset camera for another shot
                  webcam.reset();
              }
              else alert(\"PHP Error: \" + msg);
          }
      &lt;/script&gt;
  
  
  
   &lt;div id=\"upload_results\" &gt;&lt;/div&gt;
   &lt;/td&gt;
   &lt;/tr&gt;
   &lt;/table&gt;
  &lt;div class='div_button'&gt;
  &lt;table class='pok'&gt;
  &lt;tr&gt;
   &lt;form&gt;
          &lt;input type='button' value=\"skenuj\" onClick=\"take_snapshot()\" class='web' /&gt;
          &lt;input type='button' value=\"konfigurace\" onClick=\"webcam.configure()\" class='web' /&gt;
  
      &lt;/form&gt;
   &lt;/td&gt;
   &lt;/tr&gt;
   &lt;/table&gt;
  &lt;/fieldset&gt; 
  
  
       jquery functions
  
      $('#sc_id').dialog({
                      autoOpen: false,
                      width: 800,
                      modal:true,
  
                  });
  
      $('#scan_id').click(function(){
                   $('#sc_id').dialog('open');
                  return false;
            });
  </code></pre>
  
  <p>jpegcam source: webcam.js and webcam.swf are without changes..... 
  thanks for any reply.......:)</p>