Hello,
If there any reason why the following code shouldnt work in ie??
[CODE]function filterSelect(target, text, property){
if(!property) property = ‘label’;
var selectValue = this.childNodes[0].getValue()
var options = this.getElements(‘option’)
//var targetOrig = target.retrieve(‘original’)
//Store off the original values for use later
/* if(!targetOrig){
targetOrig = target.clone(1,1);
target.store(‘original’,targetOrig)
} */
//console.log(this.getElementById(‘Region’).selectedIndex.getText())
var selectText = options[this.childNodes[0].selectedIndex].getText()
//curSelect not used.
var curSelect = target.getValue();
//Reset the target
target.setHTML(targetOrig.innerHTML)
//getElementById(‘cat_id’)
//IE is stupid, it sets the width wrong if we dont set the first el text
if(!selectValue) text = target.getFirst().getText()
//Sets the top select option
target.childNodes[0].getFirst().setText(text.replace(‘%s’,selectText))
//Loop through optgroups and only display child areas
target.childNodes[0].getElements(‘optgroup’).each(function(el){
if(selectValue && el.getProperty(property) != selectText) el.remove()
})
//Reset if current value is null
if(!selectValue){
target.childNodes[0].selectedIndex = 0;
}
}
Thank you for your help.