PDA

View Full Version : LoadVars question


mykrob
04-14-2003, 07:39 PM
LoadVars question
Hey,
i have the following script on a button in a Flash form:



on(release) {
formData = new LoadVars();
formData.fName = _root.user_name.text;
formData.fPhone = _root.user_phone.text;
//and several other data collectors, this isnt important now;
formData.send("http://www.myurl.com/scripts.formHandler.php", "POST");
}



here's my question: how can i get Flash to send these variables to my PHP script WITHOUT actually launching the PHP page? Right now, it works, and i receive the formData in my email, but when the user cliecks the button, the formHandler.php page is actually loaded..

thanks,
-myk

Billy T
04-15-2003, 02:56 AM
try providing a target parameter of

this

to the send method

cheers

CyanBlue
04-15-2003, 09:04 AM
Howdy...

As Billy T said, you are not using the correct numbers of arguments for the load() function... I say just get rid of the "POST" part since Flash is actually reading that "POST" as a target frame rather than the HTTP method...If the target parameter is specified, the server's response is displayed in the browser frame window named target. If the target parameter is omitted, the server's response is discarded. on (release)
{
formData = new LoadVars();
formData.fName = _root.user_name.text;
formData.fPhone = _root.user_phone.text;
//and several other data collectors, this isnt important now;
formData.send("http://www.myurl.com/scripts.formHandler.php?uniqueID=" + getTimer());
}

mykrob
04-15-2003, 05:24 PM
thanks, guys! Didnt realize i was actually using "POST" as a window name..

will make the change when i get home and see how it goes

:)

-myk