sendAndLoad problems

  • classified
  • Expert
  • Expert
  • User avatar
  • Joined: Dec 23, 2005
  • Posts: 540
  • Loc: Bahrain
  • Status: Offline

Post May 3rd, 2006, 2:36 am

its prolly flash 7 since its mx2004 ...

can u send me your fla file ?
m0o , where <<Less is More>>
http://www.zainals.com
http://www.zainals.com/blog
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post May 3rd, 2006, 2:36 am

  • bogeangles
  • Newbie
  • Newbie
  • No Avatar
  • Joined: May 02, 2006
  • Posts: 8
  • Status: Offline

Post May 3rd, 2006, 2:41 am

yes, I will send you the fla file in about half an hour( i'll be than in my lunch break).
I've found a lot of issues about POSTing from flash, but i think that these issues are related to an older version of the player. here is the link if you want to read http://www.hifi-regler.de/shop/sony/sony_str-de495_b_schwarz-print.php?SID=f1321b03d47f5b633daa057c69e2af30

tnx
  • bogeangles
  • Newbie
  • Newbie
  • No Avatar
  • Joined: May 02, 2006
  • Posts: 8
  • Status: Offline

Post May 3rd, 2006, 4:13 am

I don't know how to upload a file here, but I think it is irrelevent, I've created a servlet that displays all paramaters and headers from the request. The fields are all and ok (in both browsers IE and FF), the only major difference is that in IE the "referer" header is missing.
It is possible that the admins check for this header and because it is missing the request is droped...
  • dkardell
  • Newbie
  • Newbie
  • No Avatar
  • Joined: Jan 23, 2007
  • Posts: 11
  • Status: Offline

Post January 23rd, 2007, 8:18 am

Did you ever get to find out why the sendAndLoad error was happending in a forum discussion you had last year? I too can get .send to work just find but don't want a new instance of the browser to pop up so I want to use sendAndLoad, however the PHP never gets call (and works just fine when I call the PHP in a browser).

Let me know if you found anything. Thanks!

Dan
  • IceCold
  • Guru
  • Guru
  • User avatar
  • Joined: Nov 05, 2004
  • Posts: 1254
  • Loc: Ro
  • Status: Offline

Post January 23rd, 2007, 10:22 pm

depends how you use the sendAndLoad methods. Show your work to the world :P
“True mastery transcede any particular art. It stems from mastery of oneself - the ability, developed throgh self-discipline, to be calm, fully aware, and complety in tune with oneself and the surroundings. Then, and only then, can a person know himself. ”
  • dkardell
  • Newbie
  • Newbie
  • No Avatar
  • Joined: Jan 23, 2007
  • Posts: 11
  • Status: Offline

Post January 24th, 2007, 8:24 am

function sendForm() {
var my_lv:LoadVars = new LoadVars();
var result_lv:LoadVars = new LoadVars();
my_lv.fName = fname.text;
my_lv.fCompany = company.text;
my_lv.fAddress = address.text;
my_lv.fPhone = phone.text;
my_lv.fEmail = email.text;
my_lv.fInterest = interest.text;
my_lv.fSubject = subject.text;
result_lv.onLoad = function(success:Boolean) {
if (success) {
status_txt.text = result_lv.welcomeMessage;
} else {
status_txt.text = "Error connecting to server.";
}
};
my_lv.sendAndLoad("email.php", result_lv,"_POST");

status_txt.text = "Thank you. You will be contacted soon... ";
};
  • IceCold
  • Guru
  • Guru
  • User avatar
  • Joined: Nov 05, 2004
  • Posts: 1254
  • Loc: Ro
  • Status: Offline

Post January 24th, 2007, 2:29 pm

1st ... next time you post code, place it inside a code tag. See the advanced replay options.
2nd: my_lv.sendAndLoad("email.php", result_lv,"_POST"); -> replace "_POST" with "POST"
3rd: make sure that in your email.php file you have something like:
echo "welcomeMessage=some text here confirming or infirming the send of the mail";
“True mastery transcede any particular art. It stems from mastery of oneself - the ability, developed throgh self-discipline, to be calm, fully aware, and complety in tune with oneself and the surroundings. Then, and only then, can a person know himself. ”
  • mdogbender
  • Born
  • Born
  • No Avatar
  • Joined: Feb 23, 2007
  • Posts: 1
  • Status: Offline

Post February 23rd, 2007, 11:24 am

I'm having the same problem. Here is my code

Code: [ Select ]
var marketInfo:LoadVars = new LoadVars();
var retInfo:LoadVars = new LoadVars();
var headers = ["Content-Type", "text/html; charset=UTF-8"];
function submitToSFDC(answer:String){
    marketInfo.contentType = "text/html; charset=UTF-8";
    marketInfo.addRequestHeader(headers);
    marketInfo.submit = "Submit Query";
    marketInfo.debug = 1;
    marketInfo.debugEmail = "myemail@gmail.com";
    marketInfo.oid = "sfcid";
    marketInfo.retURL = "http://inflowential.com";
    marketInfo.lead_source = "Inflow Marketing Website";
    marketInfo["00N40000001UcqT"] = answer;
    if(answer=="other"){ marketInfo["00N40000001Ucso"] = other_txt.text;}
//    other_txt.text = answer;
    marketInfo.sendAndLoad("https://www.salesforce.com/servlet/servlet.WebToLead",retInfo,"POST");
}
  1. var marketInfo:LoadVars = new LoadVars();
  2. var retInfo:LoadVars = new LoadVars();
  3. var headers = ["Content-Type", "text/html; charset=UTF-8"];
  4. function submitToSFDC(answer:String){
  5.     marketInfo.contentType = "text/html; charset=UTF-8";
  6.     marketInfo.addRequestHeader(headers);
  7.     marketInfo.submit = "Submit Query";
  8.     marketInfo.debug = 1;
  9.     marketInfo.debugEmail = "myemail@gmail.com";
  10.     marketInfo.oid = "sfcid";
  11.     marketInfo.retURL = "http://inflowential.com";
  12.     marketInfo.lead_source = "Inflow Marketing Website";
  13.     marketInfo["00N40000001UcqT"] = answer;
  14.     if(answer=="other"){ marketInfo["00N40000001Ucso"] = other_txt.text;}
  15. //    other_txt.text = answer;
  16.     marketInfo.sendAndLoad("https://www.salesforce.com/servlet/servlet.WebToLead",retInfo,"POST");
  17. }


Works great with just send. Doesn't work at all with sendAndLoad. I've tried putting it on the server to run it instead of just running it from within flash. No luck.

I was trying to add the referrer header mentioned in this thread, but not sure what the value should be.

What is different between send() and sendAndLoad() so that it would not work?
  • Delirious
  • Born
  • Born
  • No Avatar
  • Joined: Oct 25, 2007
  • Posts: 2
  • Status: Offline

Post October 25th, 2007, 3:14 am

The answer to sendAndLoad not working is simply a matter of order, e.g

Submit.onRelease=function() {
  • Delirious
  • Born
  • Born
  • No Avatar
  • Joined: Oct 25, 2007
  • Posts: 2
  • Status: Offline

Post October 25th, 2007, 3:15 am

The answer to sendAndLoad not working is simply a matter of order, e.g

Submit.onRelease=function() {
var lvo=new LoadVars();
lvo.srchitm=srch.text;
lvo.sendAndLoad("http://localhost/srch.php", lvo, "POST");
}

will not work, whereas

var lvo=new LoadVars();

Submit.onRelease=function() {

lvo.srchitm=srch.text;
lvo.sendAndLoad("http://localhost/srch.php", lvo, "POST");
}

will work!

Post Information

  • Total Posts in this topic: 25 posts
  • Users browsing this forum: No registered users and 50 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.