title: Iframe Redirection
body: <p>I'm currently have some issue with an iframe.</p>
  
  <p>I have my iframe with a searchbox and i want to make this searchbox redirection when i click on go... But nothing works and i can't understand what i have to do...</p>
  
  <p><a href="http://img51.imageshack.us/i/issuec.png/" rel="nofollow">http://img51.imageshack.us/i/issuec.png/</a></p>
  
  <p>EDIT : 24/02/2011
  So to be clear, my google chrome extension call as a content script : overlay.js Then this one will put at the end of the current page my "overlay.html" page. </p>
  
  <p>So the problem come from that my .html is represented as a iframe and i don't see how i can redirect from this iframe</p>
  
  <p>overlay.html</p>
  
  <pre><code>&lt;form id="searchForm" action="#" onsubmit="searchBoxRedirection(this)" method="post"&gt;
  &lt;img id="logo" src="images/extension.png" alt="Logo"&gt;&lt;/img&gt;
  &lt;input type="search" value="" name="searching"&gt;
  &lt;input type="submit" value="Go !" /&gt; 
  &lt;/form&gt;
  </code></pre>
  
  <p>overlay.js</p>
  
  <pre><code>var overlay= {
      init: function() {
          this.injectoverlay();
          //alert('Initialisation reussie');
      },
  
      injectoverlay: function() {
          var body = $('body'),
              overlayURL = chrome.extension.getURL("overlay.html"),
              iframe = $('&lt;iframe id="YouroverlayFrame" src="'+overlayURL+'"&gt;');
  
              body.append(iframe);
              iframe.show();
  
          //alert('Injection reussie');
      }
  }
  </code></pre>
  
  <p>Tool.js</p>
  
  <pre><code>function searchBoxRedirection(form)
  {
      //alert(form.searching.value);
      //tabs.create({url:"www.yahoo.fr"});
      //parent.chrome.tabs.create({url: "http://blackweb20.com/"});
      //parent.location.href='www.yahoo.fr';
      //chrome.tabs.update({url:"http://www.siteduzero.com",selected:true});
  
      //chrome.windows.create({url:"http://www.siteduzero.com"});
  }
  </code></pre>
  
  <p>manifest.json</p>
  
  <pre><code>{   
  
      "background_page" : "background.html",
      "browser_action" :
      {
          "default_icon" : "images/Extension.png"
      },
      "content_scripts": 
      [ {
        "all_frames": true,
        "css": ["css/overlay.css"],
        "js": ["js/overlay.js"],
        "matches": ["http://*/*"],
        "run_at": "document_start"
      } ], 
      "permissions" : ["tabs", "unlimitedStorage", "http://*/*"], 
      "name" : "MyOverlay",
      "version" : "1.1",
      "description" : "Sindar Overlay"
  }
  </code></pre>
  
  <p><strong>Update</strong></p>
  
  <p>I've find a part of the answer by using :</p>
  
  <pre><code>function searchBoxRedirection(form)
  {
      window.top.location.href = "http://search.yahoo.com/search?p=" + form.searching.value;
  }
  </code></pre>
  
  <p>But for the creation of new tab, or a new window it didn't work...</p>