[Flashcoders] LoadVars.sendAndLoad failing don't know why

1 view
Skip to first unread message

Steven Sacks

unread,
Aug 15, 2007, 2:55:25 PM8/15/07
to flash...@chattyfig.figleaf.com
If I use getURL() with a POST query string with arguments in the
?param=foo&param2=bar, the server script responds with a success (true).

If I use sendAndLoad to the same exact URL and same exact arguments in
the sender.param = "foo"; sender.param2="bar", the server script
responds with a fail (false).

The server script response means the params were good, false means they
were not. I cannot provide the URL for outside testing, unfortunately.

Here is my code.

var sender = new LoadVars();
var receiver = new LoadVars();
sender.dkw = INP_DeviceID.text;
sender.p = INP_Phone.text;
receiver.onLoad = function(success)
{
if (success)
{
for (var a in this)
{
if (a != "onLoad")
{
debug("response: " + a);
}
}
}
else
{
debug("failed to connect");
}
};

// THIS GETS BACK A RESPONSE OF FALSE
sender.sendAndLoad(postURL, receiver, "POST");

// THIS GETS BACK A RESPONSE OF TRUE (in the browser window)
getURL(postURL + "?dkw=" + INP_DeviceID.text + "&p=" + INP_Phone.text,
"_blank", "POST");

Same exact thing. Also, Firebug doesn't trace any arguments on the HTTP
request from the sendAndLoad().

I've been using sendAndLoad for years. This is a big WTF for me. Any ideas?
_______________________________________________
Flash...@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

Helen Triolo

unread,
Aug 15, 2007, 2:59:58 PM8/15/07
to flash...@chattyfig.figleaf.com
Are you testing from the IDE or live? You can't do a POST from the IDE.

Helen

Steven Sacks

unread,
Aug 15, 2007, 3:17:15 PM8/15/07
to flash...@chattyfig.figleaf.com
> Are you testing from the IDE or live?

I can't watch the request in Firebug if I was in the IDE. ;)

Steven Sacks

unread,
Aug 15, 2007, 3:19:03 PM8/15/07
to flash...@chattyfig.figleaf.com
Nevermind. On a lark, I just tested with GET and it worked. I knew it
was the server guy's fault.

Hans Wichman

unread,
Aug 15, 2007, 3:23:48 PM8/15/07
to flash...@chattyfig.figleaf.com
Hi Steven,

not sure what your config is, but I've been in situations where it appeared
POSTS where disallowed on the firewall.
The "If I use getURL() with a POST query string with arguments in the
?param=foo&param2=bar, the" seems like a masqueraded GET to me:), but I
might be wrong.

greetz
JC

Hans Wichman

unread,
Aug 15, 2007, 3:24:24 PM8/15/07
to flash...@chattyfig.figleaf.com
it always is, that's what makes our jobs so easy :)

On 8/15/07, Steven Sacks <flas...@stevensacks.net> wrote:
>

Reply all
Reply to author
Forward
0 new messages