T
Tom de Neef
My document has a scrollable list defined by
<FORM><SELECT ID='results' onClick='SelectItem()'></SELECT></FORM>
The idea is to display results of a search in the list.
The search routine adds <OPTION> elements to the results list. Simplified it
looks like:
outputField = document.getElementById('results')
newElement = document.createElement('OPTION')
newElement.innerText = someName
outputField.appendChild(newElement)
And at completion I add:
outputField.focus()
outputField.selectIndex=0
With IE this works fine. The results are displayed in the list and the first
line is selected.
With FF it does not work. The scrollbar on the results list indicates that
items have been added to the list, but none is displayed. The (empty) top
line gets focus. (The onClick for the SELECT list works and it indicates
that this first line is indeed associated with the first results item.)
I have no idea where to start looking for a solution. What should I do to
display the results in Firefox?
Anybody any ideas? Many thanks in advance.
Tom
<FORM><SELECT ID='results' onClick='SelectItem()'></SELECT></FORM>
The idea is to display results of a search in the list.
The search routine adds <OPTION> elements to the results list. Simplified it
looks like:
outputField = document.getElementById('results')
newElement = document.createElement('OPTION')
newElement.innerText = someName
outputField.appendChild(newElement)
And at completion I add:
outputField.focus()
outputField.selectIndex=0
With IE this works fine. The results are displayed in the list and the first
line is selected.
With FF it does not work. The scrollbar on the results list indicates that
items have been added to the list, but none is displayed. The (empty) top
line gets focus. (The onClick for the SELECT list works and it indicates
that this first line is indeed associated with the first results item.)
I have no idea where to start looking for a solution. What should I do to
display the results in Firefox?
Anybody any ideas? Many thanks in advance.
Tom