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

Reply via email to