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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

im going crazy..please help (variables onload)

Status
Not open for further replies.

gwu

MIS
Dec 18, 2002
239
US
I have this in a button code but the trace says "undefined" when i click the button however when i debug..."global.attempt1" has the correct variable in it. If i click the button a second time.. the trace comes up correctly.
******************
on (release) {
_root.emailVar = _root.emailBox.text;
_root.passwordVar = _root.passwordBox.text;
myLoadVars = new LoadVars();
myLoadVars.onLoad = function() {
_global.attempt1 = myLoadVars.attempt;
};
myLoadVars.load(" trace(attempt1);
}
**************
 
it looks like on the first click there is nothing to return hence undefined.

one of 2 things i suspect

1. loadvars is not being employed properly...hard to tell from this snippet

2. before looking into that replace myloadvars.load with
myloadvars.sendandload..that may all thats wrong
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top