PDA

View Full Version : Combo - List filtering..


Robman
05-07-2004, 05:38 AM
Hello all,

I want filter a sort of category index of link and their Url and description.

My problem is after selection from ComboBox: For the first selection is ok (the value for desc and url are ok - coincides)... but when i select another item from Combo the value remains and doesn't coincides... if i reclick on the combo the value changes...

What i've forgot...

Thanks. This the code:

the example is here: http://www.robman.it/axios/source/prova/Links.swf


var index:Array = new Array();
var listSel = function(evt){
trace("List: "+evt.target.selectedIndex) ;
trace("Combo: "+_root.Application.cbCategorieLinks.selectedIndex) ;
index[_root.Application.cbCategorieLinks.selectedIndex] = evt.target.selectedIndex ;
}
var comboSel = function(evt){
if(_root.Application.index[evt.target.selectedIndex] != undefined){
_root.Application.liLinks.selectedIndex = _root.Application.index[evt.target.selectedIndex] ;
trace("SELECTED!"+_root.Application.liLinks.selectedIndex)
} else {
trace("NOT SELECTION, FIRST ITEM!");
_root.Application.liLinks.selectedIndex = 0;
//_root.Application.laDescrizioneLinks.selectedIndex = 0;
//_root.Application.laUrl.selectedIndex = 0;
//I WANT THE FIRST DESCRIPTION!
}
}
this.cbCategorieLinks.addEventListener("change", comboSel)
this.liLinks.addEventListener("change", listSel)

if someone want the fla i send it..

Thanks