I am trying to make a search box in flash however no matter what I do I cant
manage to make it work...
here is the script in highlighted form
http://pastebin.ca/494701 and the PHP if anyone wants to or needs to see it
http://pastebin.ca/494567 on (release)
{
myVars2 = new LoadVars();
myVars2.search = Search.text
myVars2.action = 'search';
myVars2.sendAndLoad('search.php', myVars2, 'POST');
myVars2.onLoad = function()
{
mainTag2 = new XML();
elementTag2 = new XML();
dataList2 = new Array();
elementList2 = new Array();
mainTag2 = this.firstChild;
if (dataXML2.loaded) {
if (mainTag2.nodeName == "dataSet") {
dataList2 = mainTag2.childNodes;
for (i=0; i<=dataList2.length; i++) {
if (dataList2[i].nodeName == "data") {
elementList2 = dataList2[i].childNodes;
for (j=0; j<=elementList2.length; j++) {
elementTag2 = elementList2[j];
elementType2 = elementTag2.nodeName;
if (elementType2 == "questname2") {
Name2 = elementTag2.firstChild.nodeValue;
}
if (elementType2 == "Solution2") {
solution2 = elementTag2.firstChild.nodeValue;
}
if (elementType2 == "Submited2") {
submited2 = elementTag2.firstChild.nodeValue;
}
if (elementType2 == "Reward2") {
reward2 = elementTag2.firstChild.nodeValue;
}
}
// Adds the label and data to the URL.
var listData2 = { Solution2:solution2, Submited2:submited2,
Reward2:reward2};
listBox2.addItem(Name2, listData2);
}
}
}
}
// Sets the change handler for the Component named 'dropDown'.
listBox2.setChangeHandler("SelectItem2 ");
}
}