View Full Version : form post
ziggy1621
07-23-2007, 09:25 PM
i'm trying to create a form to post and not getting anywhere:
This works, but posts in a new window:
on (release) {
myMessage = new LoadVars();
myMessage.username = username.text;
myMessage.password1 = password1.text;
myMessage.send("memberLogin.php","myMessage","POST");
}
This doesn't do anything when clicked
on (release) {
myMessage = new LoadVars();
myMessage.username = username.text;
myMessage.password1 = password1.text;
myMessage.send("memberLogin.php",_SELF,"POST");
}
please help... i'm really frustrated and have read everything I could find about posting.
ziggy
_Aerospace_Eng_
07-23-2007, 09:39 PM
While the tut here is for a flash based email form, the concept is the same for any other form that uses post. http://www.kirupa.com/developer/actionscript/flash_php_email.htm
ziggy1621
07-23-2007, 09:52 PM
While the tut here is for a flash based email form, the concept is the same for any other form that uses post. http://www.kirupa.com/developer/actionscript/flash_php_email.htm
thanks, but i have looked over that tut a few times during my couple hours of frustration. I want to submit to another page, not bring in the variables.
thanks
EDIT: Nobody know how to do this?
StupidRalph
07-26-2007, 01:28 AM
Use sendAndLoad instead of send. You can return some dummy text if you want to. But this will enable you to post to a form in the background and not pop up a new window.
I'm currently using this in one of my projects...
//this is only a snippet of a function call I have set up.
// 'this.rateValue' is passed in thru the function
var send_lv:LoadVars = new LoadVars();
send_lv.rating = this.rateValue;
send_lv.memberID = memberID;//value passed via SWFObject
send_lv.songID = songID; //value passed via SWFObject
send_lv.sendAndLoad("rating.php", send_lv, "POST");
StupidRalph
07-26-2007, 01:31 AM
on (release) {
myMessage = new LoadVars();
myMessage.username = username.text;
myMessage.password1 = password1.text;
myMessage.send("memberLogin.php",_SELF,"POST");
}
try changing to
myMessage = new LoadVars();
myMessage.username = username.text;
myMessage.password1 = password1.text;
myMessage.send("memberLogin.php","_self","POST");
Please note, if you're launching this from the flash player and not a browser the GET method will be used and not POST.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.