title: Passing textbox variable to URL then open in iframe
body: <p><br>
  I have got the script below which I am using to pass a variable to a URL. When I click the search button it redirects to the URL including the variable in the text box however what I need to do is open the page in an iframe that opens beneath the search box so I can search again with the box still visible. <br>
  Any assistance would be much appreciated.<br>
  Many thanks,<br>
  Martyn.<p>P.S. I have removed the spreadsheet code from the URL.</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;body&gt;
  Search by word (case sensitive):&lt;br&gt;
  &lt;input type="text" id="urlInput" value=""&gt;
  &lt;input type="hidden" id="urlInput2" value="%22"&gt;
  
  
  &lt;button onclick="redirect()"&gt;Search&lt;/button&gt;
  
  &lt;script&gt;
  function redirect() {
  var url = "https://docs.google.com/spreadsheets/d/XXXXXXXXXXXXXXXXXX/gviz/tq?tqx=out:html&amp;tq=SELECT%20*%20where%20B%20contains%20%22" + document.getElementById('urlInput').value + document.getElementById('urlInput2').value;
  window.location=url;
  }
  &lt;/script&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>