The javascript issue comes from the fact that the script don't find the tag <div id="ajaxSearch_output"></div>. <div id="searchbox"> <form id="ajaxSearch_form" method="post" action="search-results"> <label for="ajaxSearch_input"> <input id="ajaxSearch_input" type="text" onfocus="this.value=(this.value=='Search here...')? '' : this.value ;" value="" name="search"/> </label> <label for="ajaxSearch_submit"> <button id="ajaxSearch_submit" value="" type="submit" name="sub">Search</button> </label> </form> **************** here is missing : <div id="ajaxSearch_output"></div>. </div>