I have created a form in my application as follows:
document.getElementById("formid").submit = function() { location = "/search/?search=" + encodeURIComponent( document.getElementById("search-box").value ); return false; };