Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 04-14-2003, 07:39 PM   #1
mykrob
Registered User
 
Join Date: Oct 2002
Location: Jackson, TN
Posts: 22
Question LoadVars question

LoadVars question
Hey,
i have the following script on a button in a Flash form:


Code:
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
mykrob is offline   Reply With Quote
Old 04-15-2003, 02:56 AM   #2
Billy T
Oops I did it again
 
Billy T's Avatar
 
Join Date: Oct 2001
Location: Melbourne
Posts: 8,579
Default

try providing a target parameter of

this

to the send method

cheers
__________________
Billy
Online Galleries
iPhone Safety App - iStaySafe
Free Flash Video Tutorials
Photo Website Template

Don't email or PM me questions...
Billy T is offline   Reply With Quote
Old 04-15-2003, 09:04 AM   #3
CyanBlue
Super Moderator
 
CyanBlue's Avatar
 
Join Date: Jan 2002
Location: Centreville, VA
Posts: 26,666
Default

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...
Quote:
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.
ActionScript Code:
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()); }
__________________
CyanBlue / Jason Je / Macromedia Certified Flash Developer & Designer
http://CyanBlue.FlashVacuum.com
http://www.FlashVacuum.com
http://tutorials.FlashVacuum.com

Do NOT PM, Email or Call me... Your question belongs right in this forum...
CyanBlue is offline   Reply With Quote
Old 04-15-2003, 05:24 PM   #4
mykrob
Registered User
 
Join Date: Oct 2002
Location: Jackson, TN
Posts: 22
Default

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
mykrob is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
My brain hurts (onClipEvent question) andrea_levin ActionScript 2.0 3 03-25-2004 04:23 AM


All times are GMT. The time now is 09:07 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.