Javascript URL redirect
<p>I'm creating a mock up version of google censorship for history class. I'm trying to modify the redirect url so I can put my own terms into the url:</p>

<pre><code>function searchCensor() 
{
var keyTerms = document.getElementById("search").value;
if(keyTerms == "censorship")
    window.location = "http://andrewgu12.kodingen.com/history/censor.php";
else
    window.location = "https://www.google.com/#hl=en&amp;output=search&amp;sclient=psy-ab&amp;q="+keyTerms+"&amp;oq="+keyTerms+"&amp;aq=f&amp;aqi=g4&amp;aql=&amp;gs_l=hp.3..0l4.851563l851824l0l851964l3l3l0l0l0l0l171l359l1j2l3l0.&amp;pbx=1&amp;bav=on.2,or.r_gc.r_pw.r_cp.r_qf.,cf.osb&amp;fp=bb242dc4ab43ba95&amp;biw=1920&amp;bih=963"
}
</code></pre>

<p>in the else block, I try to insert keyTerms into the URL, but I end up with undefined when the search begins. Any suggestions? Here is the URL for the website: <a href="http://andrewgu12.kodingen.com/history/" rel="nofollow">http://andrewgu12.kodingen.com/history/</a></p>
