Is there a way to count the number of items in a option list?

I have an alphabetical list and when you select a letter a select option list will populate with links. I would like to display to the user how many links are in the box.

The code is rather long, but if you need me to post some I will.

Thanks in advance

I found a way to count the list

var selectitems = document.getElementById("selectitems");
var items = selectitems.getElementsByTagName("option");
document.write('<p>The number is '+ items.length +'</p>');

any ideas how to 'ajaxify' it so it will update when i select a different letter?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.