-
Hello.
I have a similar problem with using the loadVars() function in connecting it with my php script that handles the data.
Nothing seems to be wrong with the php script because when I run it using actionscript's send() function, the data gets emailed.
So the problem has to be in the actionscript because when I used LoadVars() and loadVariables() funtions, they don't work, in other words, nothing happens to the email script.
But then again, I was wondering that maybe it's because a php script cannot run unless it's opened? D'uh, I don't know.
Okay now, here's the actionscript code:
Code:
on (release) {
if (...some condition I placed...) {
var submit:LoadVars = new LoadVars();
submit.emailTo = "bernie.leano@star22home.com";
submit.emailFrom = data_mc.email_input.text;
submit.emailSubject = "star22home Form Submission";
submit.firstname = data_mc.first_input.text;
submit.lastname = data_mc.last_input.text;
submit.company = data_mc.company_input.text;
submit.telephone_area = data_mc.telephone_input_area.text;
submit.telephone1 = data_mc.telephone_input1.text;
submit.telephone2 = data_mc.telephone_input2.text;
submit.mssg = data_mc.message_input.text;
submit.fax_area = data_mc.fax_input_area.text;
submit.fax1 = data_mc.fax_input1.text;
submit.fax2 = data_mc.fax_input2.text;
submit.loadVariables("http://www.star22home.com/submit.php","_self","POST");
this.nextFrame();
}
else {
data_mc.alert_dt.text = "Error: Fill in all required fields in proper format.";
}
}
A little help please. Thank you for the time.
-
Hi,
should be submit.sendAndLoad() if youwant to stay in flash, or submit.send() if you want a html page back
Musicman
-
Thank you Musicman. I will try it.
-
This is odd. I tried replacing it with submit.sendAndLoad(...); but still nothing happens. Only the submit.send(...) function does.
-
note:
- did you test the .php file on the same domain and in the same chmod folder
- try a clean flash script first with you send();
then thereafter when succeeded, try your complicated flash script like yours is
all punctuation and syntax looks fine to me, so.. try excluding (comment 2)
http://www.michaellobry.com specialized by and for Web Media Designers. Herein shown should be summarizings about Web Media Design (eg. all CSS rules, SHTML tags, How to PHP, Macromedia/ Adobe app how-tos, etc. Please e-mail yours to webmaster@michaellobry.com so that everybody learns)
-
Originally Posted by johnwhello
note:
- did you test the .php file on the same domain and in the same chmod folder
- try a clean flash script first with you send();
then thereafter when succeeded, try your complicated flash script like yours is
all punctuation and syntax looks fine to me, so.. try excluding (comment 2)
Yes, I did try testing the .php file and it works and I already placed it on the same domain and in ythe same chmod folder.
Though I don't understand which comment you are pertaining to in my script. Could you point it out for me? Thank you.
-
It's no 'comment 2' from your script, but from my text, which is:
First, try a clean script: thus as empty as possible, (yours isn't empty enough, that is what i meant). Once you have a really truly basic Action Script Code, try see if it works. If it works, try adding your scripts line by line if able. Using this excluding method, you might find some remedy/ alternative solution.
http://www.michaellobry.com specialized by and for Web Media Designers. Herein shown should be summarizings about Web Media Design (eg. all CSS rules, SHTML tags, How to PHP, Macromedia/ Adobe app how-tos, etc. Please e-mail yours to webmaster@michaellobry.com so that everybody learns)
-
Got'cha. Thanks for the tip.
-
Login Example
MusicMan,
is it possible that you could make a simple login fla file that contains the login details you explained above.
It is always easier for everyone to learn by looking at a working fla, as opposed to trying to sort out all the details from forum posts.
I am sure this would help a LOT of members.
I have now spent 4 whole days on this problem :-(
Thanks in advance.
-
Does this section:
submit.loadVariables("http://www.star22home.com/submit.php","_self","POST");
need not be specific as to the php file's location?
Will
submit.loadVariables("submit.php","_self","POST"); do regardless of the root domain?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|