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

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -