document.getElementById("SEARCH").select();
document.getElementById("SEARCH").focus();
Now I create the element the following way (see below) in my js function followed by the two lines above. I get no error message, but the input field has not received focus.
Expand|Select|Wrap|Line Numbers
- td.innerHTML = '<INPUT'+
- ' type="text"'+
- ' name="SEARCH"'+
- ' id="SEARCH"'+
- ' maxLength='+ cMax +
- ' size='+ cLength +
- ' onKeyPress="if (isEnter(event)) {'+cInsert+'};"'+
- ' />';