call onClick from JavaScript function -
i have created live search displays results in table row. row has onclick function executes process of selecting result. onclick function works fine mouse click want user can select up/down arrow key & enter too. want function set in onclick called other javascript function. please......
myelement.onclick = function() { // called when myelement clicked }
or just
myelement.click(); // clicks element
and use onkeydown event call it, , check characters before click();
myfield.onkeydown = function() { myelement.click(); }
Comments
Post a Comment