I'll explain what to do next , while here is html code =>
<fieldset>
<legend>Get Data Ajax</legend>
<form name="ajax" method="get" action="getData.php">
<input type="text" name="getName" id="getName">
</form>
<div class="resBox" id="resBox"></div> <!-- this div is where results are placed-->
</fieldset>
I've written ajax script which is retrieving some info from mysql database onkeyup in input field and then I have done also how to collapse info down from this field. Here is the situation , can anyone explain how to do (when info already collapsed) that in up and down arrows could movement into info ? Please give an advice how to do that ?
In conclusion I am interested in how to handle javascript key events. please give some examples, thanks :)
I've tried like so but it is not working =>
var key;
if (window.event){
key = e.keyCode;
} else {
key = e.which;
}
if (key==13){ // enter for example
alert("something");
}