|
[x]
Posted via EE Mobile
|
|
| Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again. |
|
|
|
|
Asked by al3cs12 in JavaScript, Document Object Model, Opera Web Browser
Hello,
I'm trying to select options from an select input based on keystrokes from other input text box, and its working everywhere except Opera where if i hit the down or up arrow its saying `caitlin` or `S51 Typ 1-4`. The input:
<input id="search" name="search" value="">
And from here in JS i place onkeyup events and if the key is arrow down or arrow up i do the following:
var select = document.getElementById('s
elect');
if(key==down){
if(select.selectedIndex+1 < select.options.length) {
select.options[select.sele
ctedIndex+
1].selecte
d= 'true';
SelectOption();
}
}
else if(key==up){
if(select.selectedIndex-1 >= 0) {
select.options[select.sele
ctedIndex-
1].selecte
d= 'true';
SelectOption();
}
}
Anyone can help?
Thanks
20091021-EE-VQP-81 - Hierarchy / EE_QW_3_20080625