Hi, i am trying to get the data of the listbox dynamically from a database, i have the code that does that, but i want it so when you click an item in the listbox it does something.
any ideas on how to make it do something?
i have this so far for the code on the listbox
all it comes up with is [Object Object]
any ideas??
Martin
Computing help and info:
Code:
//Create LoadVars object and load file
myData = new LoadVars();
//myData.load("anastasio.asp") //asp line
myData.load("[URL unfurl="true"]http://localhost/search.php");[/URL]
//php line
myData.ref = this;
//Fetch data
myData.onLoad = function(succes) {
if (succes) {
for (var i = 0; i<this.cant; i++) {
this.ref["Title_txt"+i].htmlText = "<b>"+this["Title"+i]+"</b>";
_root.results.addItem(this["Title"+i]);
}
} else {
trace("Error loading data");
}
};
stop();
any ideas on how to make it do something?
i have this so far for the code on the listbox
Code:
on (change){
trace(this.selectedItem);
}
all it comes up with is [Object Object]
any ideas??
Martin
Computing help and info: