Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple actionscript problem

Status
Not open for further replies.

wreikun

Technical User
Apr 23, 2002
63
US
Hello everyone. I have a flash mx newbie question regarding some actionscript im trying to get working. I have an input textfield with an instance name of 'textfield1' and a button with an instance name of 'button1'. I want it so that whatever is in the textfield is passed to the php file in the server when the button is pressed.

Now, when I use the following actionscript, the value in the textfield does not seem to get passed to the php file cuz it comes up blank.

_root.button1.onRelease = function() {
var xxx=_root.textfield1;
var c = new LoadVars();
c.thisletter= xxx;
c.send("honban.php","_self","POST");
}

However, when I use the following different actionscript, the value I assign to 'c.thisletter' gets passed to my php file successfully and it works as expected.

_root.button1.onRelease = function() {
var c = new LoadVars();
c.thisletter= "A";
c.send("honban.php","_self","POST");
}

I would like to get the former actionscript to work.

Any help is appreciated. Thanks in advance,
REI
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top