|
-
[RESOLVED] sendandload response error
the script is working in that if i submit a valid email address it is being added to the Db but the the response from the loadvars is a weird string, see below.
i have error handling for an invalid email address in my flash movie but their is a server side check too but i always get undefined and some crazy big string.
totally lost as to why this is occuring, any thoughts/idea would be greatly appreciated?
AS Code:
function fnc_submit_email(){
if(verify_email(str_email)){
//SUBMIT EMAIL
var result_lv:LoadVars = new LoadVars();
result_lv.onLoad = function(success:Boolean) {
if (success) {
trace("result_lv.return_code = "+result_lv.return_code);
_root.mc_dialog.str_text = result_lv.return_code;
trace(result_lv);
}
};
var send_lv:LoadVars = new LoadVars();
send_lv.str_email = str_email;
send_lv.sendAndLoad("../scr/email.php", result_lv, "POST");
}else{
_root.mc_dialog.str_text = "invalid address";
}
}
PHP Code
echo "&return_code = ".$result['Result']['Code'];
Object returned to Flash
return%5Fcode%20=%20%22%2E%24result%.............. ....
Last edited by discobear; 02-09-2010 at 12:56 PM.
-
sorted, i was being an idiot. hadnt used this code in long time and made some silly errors
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|