Options count in 4.0 gone?

Since i Version 4.0 i miss the option


to get a count of the loaded option in the combobox. Is there a new way to figure that out?

With best regards,
Uwe Janke

You can use iterator to coult items, i.e.

var i=0; myCombo.forEachOption(function(){i++;}); console.log(i)
You can try the next code sample:


Object API init div.combo_info { color: gray; font-size: 11px; padding-bottom: 5px; padding-left: 2px; font-family: Tahoma; } var myCombo; function doOnLoad() { myCombo = new dhtmlXCombo({ parent: "combo_zone", width: 230, filter: true, name: "combo", items: [ {value: "1", text: "The Adventures of Tom Sawyer"}, {value: "2", text: "The Dead Zone", selected: true}, {value: "3", text: "The First Men in the Moon"}, {value: "4", text: "The Girl Who Loved Tom Gordon"}, {value: "5", text: "The Green Mile"}, {value: "6", text: "The Invisible Man"}, {value: "7", text: "The Island of Doctor Moreau"}, {value: "8", text: "The Prince and the Pauper"} ] });
	function optionsCount(){
		var i=0;


Thank you for your quick reply. I had already found Foreach of corse is a option.
I hoped for a property which can do this without the interation.
However it works. Thanks.

You are welcome!