Arrow keys are not working in dropDown

2019-08-24 22:42发布

问题:

I am working on a JSP page, It has a comboBox/dropdown, everything is working fine except when user try to use arrow key(Up/down) scroll bar doesn't move accordingly hence user is unable to see the text. What should I do to make it work?

On some forum I read this problem would be solved if use relative position instead of absolute in wrapping div, but it also didn't work.

Edit:Code Added

<div id="_divTblcombo" class="tblDiv" style="visibility:hidden;width:265px; height:130px; position:absolute" onMouseDown="document.getElementById('myName_combo').focus()">

<table id="_tblcombo" cellpadding="0" cellspacing="0" border=0 class="mYTable" width="100%" >
<tr   id=TR onMouseOver="deHightlightRows('myName_combo');this.className='mouseOver';" onMouseOut=this.className='mouseOut';>
<td id="" align="left" nowrap onMouseDown="selectRow(this,'myName_combo','','right','id');document.forms[0].DropdownCall.value='true';document.forms[0].operation.value='getName'; document.forms[0].submit();" >---No Name---
</td>
</tr>
<tr   id=STRA onMouseOver="deHightlightRows('myName_combo');this.className='mouseOver';" onMouseOut=this.className='mouseOut';>
<td id="Stral" align="left" nowrap onMouseDown="selectRow(this,'myName_combo','Stral','right','id');document.forms[0].DropdownCall.value='true';document.forms[0].operation.value='getName'; document.forms[0].submit();" >STRALL
</td> 
</tr>