[thelist] works in IE5.0 but not in Opera/NN

.jeff jeff at members.evolt.org
Mon May 6 15:35:01 CDT 2002


matthias,

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> From: Matthias Ritzkowski
>
> on this page, I retrieve values for a list box
> (lstAllAuthors) from the DBserver.  After the list box
> is created, I create navigation buttons, to allow for
> different actions.
>
> The function goAender works in IE, but does nothing in
> Opera and NN. Does anybody know why?
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

yup.  two things are likely culprits.

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> var ind = lstAllAuthors.options.selectedIndex;
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

selectedIndex is a property of the select object, not the options.  try this
instead:

var ind = lstAllAuthors.selectedIndex;

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> var idx = lstAllAuthors.options(ind).value;
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

options is an array.  ie is the only one that lets you access array elements
with parenthesis instead of square brackets.  try this instead:

var idx = lstAllAuthors.options[ind].value;

good luck,

.jeff

http://evolt.org/
jeff at members.evolt.org
http://members.evolt.org/jeff/





More information about the thelist mailing list