G
groups2
When you press the down key while in an input field the default
behavior for some event creates a dropdown of the previously input
text.
What event creates that behavior and how do I stop it ?
For example, to prevent ANY type of default behavior when clicking ANY
key, I thought this would work, but the dropdown still occurs. What am
I doing wrong ?
In html file:<body onload="registersearch()" >
Search Text: <input type='text' id='searchtext' />
in javascript file:
function blank(){
return false;
}
function registersearch(){
document.getElementById("searchtext").onkeyup=blank;
document.getElementById("searchtext").onkeypress=blank;
document.getElementById("searchtext").onkeydown= blank;
document.getElementById("searchtext").onclick=blank;
}
behavior for some event creates a dropdown of the previously input
text.
What event creates that behavior and how do I stop it ?
For example, to prevent ANY type of default behavior when clicking ANY
key, I thought this would work, but the dropdown still occurs. What am
I doing wrong ?
In html file:<body onload="registersearch()" >
Search Text: <input type='text' id='searchtext' />
in javascript file:
function blank(){
return false;
}
function registersearch(){
document.getElementById("searchtext").onkeyup=blank;
document.getElementById("searchtext").onkeypress=blank;
document.getElementById("searchtext").onkeydown= blank;
document.getElementById("searchtext").onclick=blank;
}