I have following function
function sortlistC(id) {
var lb = document.getElementById(id);
arrTexts = new Array();
for(i=1; i < lb.length; i++) {
arrTexts = lb.options.text+':'+lb.options.value;
}
arrTexts.sort();
for(i=1; i < lb.length; i++) {
el = arrTexts.split(':');
lb.options.text = el[0];
lb.options.value = el[1];}
all I need to get the lb.length -1 so I can get 1 less then the entire length of string
please help me to know how to do this in javascript
thank you very much
function sortlistC(id) {
var lb = document.getElementById(id);
arrTexts = new Array();
for(i=1; i < lb.length; i++) {
arrTexts = lb.options.text+':'+lb.options.value;
}
arrTexts.sort();
for(i=1; i < lb.length; i++) {
el = arrTexts.split(':');
lb.options.text = el[0];
lb.options.value = el[1];}
all I need to get the lb.length -1 so I can get 1 less then the entire length of string
please help me to know how to do this in javascript
thank you very much