SendAndLoad...Return value
Hej AlleJeg prøver at gemme noget i en database via denne funktion:
----------------------------------------------------------------
function submitEntry(thename){
myVars = new LoadVars();
myVars.flashplayername = thename;
myVars.onData = function(src){
myVars.decode(src)
if (myVars.theresult == "Okay") {
trace("succes");
}
return myVars.theresult;
}
myVars.sendAndLoad("http://"+_parent.whatdomain+_parent.folderpath+"submit.php", myVars, "POST");
}
----------------------------------------------------------------
Kalder den med noget i denne stil:
theReturnValue = submitEntry(1000);
trace(theReturnValue);
Men min returnvalue er altid bare undefined ??
Nogen ide hvorfor ?