on (release)
{
//if(Search.length > 0)
//{
myVars = new LoadVars();
myVars.search = Search.text
myVars.action = 'search';
myVars.sendAndLoad('search.php', myVars, 'POST');
myVars.onLoad = function()
{
dataXML = new XML();
dataXML.onLoad = convertXML;
// Just change this to your file that generates or contains the XML your going to use.
// Make sure to change the real path the the file - chances are it will not be in a folder
// called Files.
dataXML.load("search.php");
function convertXML () {
mainTag = new XML();
elementTag = new XML();
dataList = new Array();
elementList = new Array();
mainTag = this.firstChild;
if (dataXML.loaded) {
if (mainTag.nodeName == "dataSet") {
dataList = mainTag.childNodes;
for (i=0; i<=dataList.length; i++) {
if (dataList[i].nodeName == "data") {
elementList = dataList[i].childNodes;
for (j=0; j<=elementList.length; j++) {
elementTag = elementList[j];
elementType = elementTag.nodeName;
if (elementType == "questname") {
Name = elementTag.firstChild.nodeValue;
}
if (elementType == "Solution") {
solution = elementTag.firstChild.nodeValue;
}
if (elementType == "Submited") {
submited = elementTag.firstChild.nodeValue;
}
if (elementType == "Reward") {
reward = elementTag.firstChild.nodeValue;
}
}
// Adds the label and data to the URL.
// Adds the label and data to the URL.
var listData2 = { Solution:solution, Submited:submited, Reward:reward};
listBox2.addItem(Name, listData2);
}
}
}
}
// Sets the change handler for the Component named 'dropDown'.
listBox2.setChangeHandler("SelectItem2 ");
}
}
}
//}