It seems simple, but when am trying to implement it was really hard to find..
My requireement is like to find the length of a d dropdown where options are coming from json ..
Am able to get the options from a jsp file which returns json..
I am trying to write a listener to give some alert message for length of a dropdown, for me which is always retuning zero..
var items = $("#DropDownList1 options");
alert(items.length); //Output: 0
alert($("#DropDownList1 options").length); //Output:0
('DropDownList1').options.length); //Output: 0
all the above are not working for me.. can any one please sujjest me to this problem..
try option without a s $("#DropDownList1 option").length