...

View Full Version : Having Trouble with gotoAndStop after loadVariables



macmonkey
03-04-2008, 04:56 AM
Greetings,

I've got a form with 3 "steps" and I want to submit each step at a time.

Everything is working fine but I'm unable to successfully call both of these functions at once:

on(release) {
form_1.loadVariables("post.php", "POST");
gotoAndStop(2);
}


I have the above function inside my "button" that is successfully going to the next frame (2) but it's not posting. If I remove gotoAndStop(2) it SUCCESSFULLY submits the form.

Any idea what I'm doing wrong?

Thanks

jw

_Aerospace_Eng_
03-04-2008, 05:50 AM
I think the post is taking longer than it takes to go to the next frame. You can try putting a setTimeout on the gotoandstop or if you can some how check to see if loadVariables is done posting. I don't know how you can do this.

macmonkey
03-04-2008, 01:28 PM
Hey Aero,

Thanks for your help. I took your suggestion and figured out something that works fine. I attached the below code to my form button:


on(release) {

function moveOn() {
gotoAndStop(2);
}

form_1.loadVariables("post.php", "POST");
setTimeout(moveOn, 1000);
}






Thank You



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum