Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / Data Integration / May 2007



Tip: Looking for answers? Try searching our database.

Flash and PHP

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
joeschmoesdf - 18 May 2007 12:45 GMT
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 ");

    }
}
MotionMaker - 18 May 2007 17:58 GMT
1.  What is the issue?

2. In the meantime place this
myVars2.sendAndLoad('search.php', myVars2, 'POST');
after the
myVars2.onLoad = function()
function.
joeschmoesdf - 19 May 2007 03:06 GMT
The issue is that there is nothing returned. I tested the PHP however I cant get it to return the XML from the PHP correctly
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.