Using jQuery, how can I dynamically set the size attribute of a select box? -
using jquery, how can dynamically set size attribute of select box?
i include in code:
$("#myselect").bind("click", function() { $("#myotherselect").children().remove(); var options = '' ; (var = 0; < myarray[this.value].length; i++) { options += '<option value="' + myarray[this.value][i] + '">' + myarray[this.value][i] + '</option>'; } $("#myotherselect").html(options).attr [... use myarray[this.value].length here ...]; }); });
oops, it's
$('#myselect').attr('size', value)
Comments
Post a Comment