I have the following code:
<div class="search"> <input type="text" id="tbWasSearch" value="Search here..." class="project" onclick="this.value=''"/> <input type="button" id="tbWasSeachButton" class="tbWasSeachButton" onclick="searchWas();" /> </div> function searchWas() { var txt = $("#tbWasSearch").val(); if (txt != "") { var url = "http://eiff/server.pt?=" + txt; window.open(url); $("#tbWasSearch").val(''); } } I want that once i put text in tbWasSearch and press enter, the text entered with inoke searchWas(); Should be the same mechanism as when i put text and click the search button
How can this be done?
formtags?