Hi, im trying to delete a HTML select list. This is what im using:
var size = DID(SourceDiv + Number).options.length;
DeleteSelectElements(SourceDiv+Number,size);
function DeleteSelectElements(Div,Len){
var k;
var Length = Len
for (k = 0; k < Length; k++) {
DID(Div).options[k] = null;
}
}
DID just returns the actual HTML element. The problem is that only EXACTLY hald the list is being deleted. The Len parameter is changing because it relates to size, which related to the actual length of the list. So when i delete in the function its actually changing 'Length' and never reaching the actual end of the list :s