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:
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&output=search&sclient=psy-ab&q="+keyTerms+"&oq="+keyTerms+"&aq=f&aqi=g4&aql=&gs_l=hp.3..0l4.851563l851824l0l851964l3l3l0l0l0l0l171l359l1j2l3l0.&pbx=1&bav=on.2,or.r_gc.r_pw.r_cp.r_qf.,cf.osb&fp=bb242dc4ab43ba95&biw=1920&bih=963"
}
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: http://andrewgu12.kodingen.com/history/