Well, I tried it by itself without the mailData:LoadVars... still no
luck in the browser.
Worked fine testing it...
On Sep 21, 2006, at 1:31 PM, Mike Keesey wrote:
Actually, scratch that -- move the whole formData deal to its own
function, and call that from onMailComplete(). IOW, do the calls
sequentially, not simultaneously.
―
Mike Keesey
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:flashcoders-
[EMAIL PROTECTED] On Behalf Of Mike Keesey
Sent: Thursday, September 21, 2006 11:07 AM
To: 'Flashcoders mailing list'
Subject: RE: [Flashcoders] HTTP post request in the background
onResponseComplete is probably being called before
onMailDataResponseComplete (damn that's a long name! onMailComplete
would suffice, no?), and thus unloading the whole SWF as it loads a
new
HTML page.
Try moving this line:
formData.sendAndLoad("http://www.salescloser.com/XMLAddContact.aspx",
response);
... to the very end of your processForm() function.
―
Mike Keesey
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:flashcoders-
[EMAIL PROTECTED] On Behalf Of Bill Abel
Sent: Thursday, September 21, 2006 10:20 AM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] HTTP post request in the background
I'm still having one problem. When I test this movie from within
Flash, it sends both LoadVars, but when I try it from the .swf on
the
web server, it only sends to the .php script.
Anyone see the problem?
import mx.utils.Delegate;
function onResponseComplete(success:Boolean):Void {
getURL("http://www.hallmanhill.com/information/thankyou.html");
trace("posted data");
}
function onMailDataResponseComplete(success:Boolean):Void {
trace("sent email");
}
function processForm() {
var response = new LoadVars();
var formData:LoadVars = new LoadVars();
formData.firstname = firstname_tb.text;
formData.lastname = lastname_tb.text;
formData.address = address_tb.text;
formData.city = city_tb.text;
formData.state = state_tb.text;
formData.zip = zip_tb.text;
formData.homephone1 = areacode;
formData.homephone2 = prefix;
formData.homephone3 = linenumber;
formData.email = email_tb.text;
response.onLoad = Delegate.create(this, onResponseComplete);
formData.sendAndLoad("http://www.salescloser.com/
XMLAddContact.aspx", response);
trace(formData);
var mailData = new LoadVars();
var mailDataResponse = new LoadVars();
mailData = formData;
mailDataResponse.onLoad = Delegate.create(this,
onMailDataResponseComplete);
mailData.sendAndLoad("http://test.slaughtergroup.com/mail.php",
mailDataResponse, "POST");
trace(mailData);
}
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com