Question
Post to 1shoppingcart
Hi all,
I am a newbe to Flash and I have built a flash file that ends up with user input fields which write data to my 1shoppingcart autoresponder. From 1shoppingcart I got the HTML code to capture my website visitors name, email & phone number.
<form name="form1" method="post" action="https://www.mcssl.com/app/contactsave.asp">
<input name="merchantid" type="hidden" id="merchantid" value="111555">
<input name="ARThankyouURL" type="hidden" id="ARThankyouURL" value=" http://www.mypropfolio.com/thank-you.asp">
<input name="copyarresponse" type="hidden" id="copyarresponse" value="1">
<input name="custom" type="hidden" id="custom" value="0">
<input name="defaultar" type="hidden" id="defaultar" value="3273555>
<input name="allowmulti" type="hidden" id="allowmulti" value="0">
<input name="visiblefields" type="hidden" id="visiblefields" value="Name,Email1,Workphone">
<input name="requiredfields" type="hidden" id="requiredfields" value="Name,Email1">
<table align="left">
<tr>
<td height="40"> </td>
</tr>
<tr>
<td>Name</td>
<td><input name="Name" type="text" size="25"></td>
</tr>
<tr>
<td>Email</td>
<td><input name="Email1" type="text" size="25"></td>
</tr>
<tr>
<td>Phone</td>
<td><input name="Workphone" type="text" size="25"></td>
</tr>
<tr align="center">
<td> </td>
<td colspan="2">
<input type="Submit" name="cmdSubmit" value="Submit">
I created an actionscript to do perform the same post and it looks like this:
var variables:URLVariables = new URLVariables();
var varSend:URLRequest = new URLRequest(" http://www.mypropfolio.com/images/flash/alan.aspx");
var varLoader:URLLoader = new URLLoader;
varSend.method = URLRequestMethod.POST;
varSend.data = variables;
submit_btn.addEventListener(MouseEvent.CLICK, sendActions);
function sendActions(event:MouseEvent):void {
variables.merchantid = 111555;
variables.ARThankyouURL = " http://www.mypropfolio.com/thank-you.asp";
variables.copyarresponse = 1;
variables.custom = 0;
variables.defaultar = 3273555;
variables.allowmulti = 0;
variables.visiblefields = "Name,Email1,Workphone";
variables.requiredfields = "Name,Email1";
variables.Name = Name.text;
variables.Email1 = Email1.text;
variables.Workphone = Workphone.text;
variables.cmdSubmit = "Submit";
varLoader.load(varSend);
}
When I try to submit the information from my new flash website it does not work and when I did a trace on the application all of my variables seem to be working correctly but not in the same sequence as I had added them to the Actionscript. The only other difference on the trace is at the end of the correct post I get the following fields.
bh_is
bh_fv
bh_fx
bh_iw
bh_ib
I have been working on this for a few days so if you have any help I would greatly appreciate it.
Thanks
Alan
I am a newbe to Flash and I have built a flash file that ends up with user input fields which write data to my 1shoppingcart autoresponder. From 1shoppingcart I got the HTML code to capture my website visitors name, email & phone number.
<form name="form1" method="post" action="https://www.mcssl.com/app/contactsave.asp">
<input name="merchantid" type="hidden" id="merchantid" value="111555">
<input name="ARThankyouURL" type="hidden" id="ARThankyouURL" value=" http://www.mypropfolio.com/thank-you.asp">
<input name="copyarresponse" type="hidden" id="copyarresponse" value="1">
<input name="custom" type="hidden" id="custom" value="0">
<input name="defaultar" type="hidden" id="defaultar" value="3273555>
<input name="allowmulti" type="hidden" id="allowmulti" value="0">
<input name="visiblefields" type="hidden" id="visiblefields" value="Name,Email1,Workphone">
<input name="requiredfields" type="hidden" id="requiredfields" value="Name,Email1">
<table align="left">
<tr>
<td height="40"> </td>
</tr>
<tr>
<td>Name</td>
<td><input name="Name" type="text" size="25"></td>
</tr>
<tr>
<td>Email</td>
<td><input name="Email1" type="text" size="25"></td>
</tr>
<tr>
<td>Phone</td>
<td><input name="Workphone" type="text" size="25"></td>
</tr>
<tr align="center">
<td> </td>
<td colspan="2">
<input type="Submit" name="cmdSubmit" value="Submit">
I created an actionscript to do perform the same post and it looks like this:
var variables:URLVariables = new URLVariables();
var varSend:URLRequest = new URLRequest(" http://www.mypropfolio.com/images/flash/alan.aspx");
var varLoader:URLLoader = new URLLoader;
varSend.method = URLRequestMethod.POST;
varSend.data = variables;
submit_btn.addEventListener(MouseEvent.CLICK, sendActions);
function sendActions(event:MouseEvent):void {
variables.merchantid = 111555;
variables.ARThankyouURL = " http://www.mypropfolio.com/thank-you.asp";
variables.copyarresponse = 1;
variables.custom = 0;
variables.defaultar = 3273555;
variables.allowmulti = 0;
variables.visiblefields = "Name,Email1,Workphone";
variables.requiredfields = "Name,Email1";
variables.Name = Name.text;
variables.Email1 = Email1.text;
variables.Workphone = Workphone.text;
variables.cmdSubmit = "Submit";
varLoader.load(varSend);
}
When I try to submit the information from my new flash website it does not work and when I did a trace on the application all of my variables seem to be working correctly but not in the same sequence as I had added them to the Actionscript. The only other difference on the trace is at the end of the correct post I get the following fields.
bh_is
bh_fv
bh_fx
bh_iw
bh_ib
I have been working on this for a few days so if you have any help I would greatly appreciate it.
Thanks
Alan
