View Full Version : Query String Garbage
webm0nster
04-04-2003, 07:47 PM
I have a simple swf that I want to run on my local machine that has two text inputs and a button. I wrote a Perl script to echo the contents of the boxes to a blank browser using getUrl in a frame action. The movie stops on the first frame so you can type content into the two text boxes then you click the button which sends you to the second frame that has the getUrl frame action.
No matter what method I use Get or Post the browser opens with this gibberish for a query string.
http://www.bluehalo.net/cgi-bin/flashtest.pl?FUIComponentClass=%5Btype+Function%5D&FScrollBarClass=%5Btype+Function%5D&FPushButtonClass=%5Btype+Function%5D&FScrollPaneClass=%5Btype+Function%5D&message1=%3CP+ALIGN%3D%22LEFT%22%3E%3C%2FP%3E&message2=%3CP+ALIGN%3D%22LEFT%22%3E%3C%2FP%3E
Any ideas?
webm0nster
04-04-2003, 08:28 PM
It is pretty simple...
getURL("http://www.bluehalo.net/cgi-bin/flashtest.pl", "_blank", "GET");
The two input boxes are named title and body there are also two dynamic text boxes on the stage message1 and message2 that I was using to test getting output from Perl with loadVariablesNum which worked btw.. but I remove all code from the swf except for stop(); on the first frame and the above getURL on the second frame.
webm0nster
04-04-2003, 08:36 PM
Here is the fla if you would like to look at it...
webm0nster
04-04-2003, 08:52 PM
Also fixed the pl to be insensitive to the query string... it should output the input text uuencoded to the browser if the query string was right...
webm0nster
04-04-2003, 08:53 PM
Yes I am using Flash MX...
CyanBlue
04-04-2003, 09:03 PM
Howdy...
Try this code and see if it works for you... Don't know what you have in your Perl script, but basically this will be the same thing...on (release)
{
testLVs = new LoadVars()
testLVs.title = _root.title.text;
testLVs.body = _root.body.text;
testLVs.onLoad = function ()
{
trace(unescape(testLVs));
}
testLVs.sendAndLoad("http://www.bluehalo.net/cgi-bin/flashtest.pl", testLVs, "POST");
}You should not use getURL to call the script... ;)
webm0nster
04-04-2003, 09:24 PM
I am going to need output to be turned over to the perl script in some instances. Your code works within Flash but does emulate the ability to open a new browser instance and display the output. How the heck do you commit data to outside processes if getURL no longer works for this in MX. A common example of what I am aiming for is a rich interface to add data to a database and then redirect to a php page that displays the entered info.
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.