title: How To Reload A iframe Using jQuery
body: <p>I've created a basic browser within a browser window using an iframe:</p>
  
  <p>The purpose is to allow mouse-over styling of elements using jquery ie/ highlight all links red etc... change font etc..</p>
  
  <p>I've created two files:</p>
  
  <p><strong>browser.php</strong></p>
  
  <pre><code>&lt;html&gt;
      &lt;head&gt;
          &lt;title&gt;&lt;/title&gt;
  
          &lt;style&gt;
  
          #netframe {
              float:right; 
              height: 100%; 
              width: 80%;
          }
  
          #sidebar {
              float:left; 
              height: 100%; 
              width: 20%;
          }
  
          &lt;/style&gt;
  
  
  
      &lt;/head&gt;
      &lt;body&gt;
  
  
      &lt;div id="container"&gt;
  
          &lt;div id="sidebar"&gt;
  
      Enter A URL:
              &lt;input type="text" name="url" id="url"&gt;
              &lt;input type="button" value="load" id="load"&gt;
  
              &lt;br&gt;&lt;br&gt;    
  
  
          &lt;/div&gt;
  
          &lt;div id="netframe"&gt;
              &lt;iframe height="100%" width="100%" class="netframe" src="pullsite.php" id="main_frame"&gt;&lt;/iframe&gt;
          &lt;/div&gt;
  
      &lt;/div&gt;
  
  
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>And <strong>pullsite.php</strong></p>
  
  <pre><code>&lt;html&gt;
  
  &lt;head&gt;
  
      &lt;title&gt;&lt;/title&gt;
  
      &lt;link href="css/reset.css" rel="stylesheet" type="text/css"&gt;
  
      &lt;style&gt;
          .highlight { 
              outline-color: -moz-use-text-color !important;
              outline-style: dashed !important;
              outline-width: 2px !important;
          }
      &lt;/style&gt;    
  
      &lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"&gt;&lt;/script&gt;
  
  
  
  &lt;/head&gt;
  
      &lt;body&gt;
  
      &lt;div id="contents"&gt;           
  
      &lt;?php echo file_get_contents('http://www.google.com/webhp?hl=en&amp;tab=iw'); ?&gt;
  
      &lt;/div&gt;
  
          &lt;script&gt;
  
          $("#contents").contents().find("a").addClass("highlight");
  
          &lt;/script&gt;
  
  
      &lt;/body&gt;
  
  
  &lt;/html&gt;
  </code></pre>
  
  <p>Can someone please help with the jquery code I could use allow a user to enter a new url in the input field and reload the iframe.</p>
  
  <p>Thanks!!!</p>