开发者

Run function on popup close - flex

开发者 https://www.devze.com 2022-12-22 07:23 出处:网络
I\'ve got a flex project that I\'m working on. Currently I\'ve got a popup that consists of another mxml file containing a form.

I've got a flex project that I'm working on. Currently I've got a popup that consists of another mxml file containing a form.

Once the form is filled in and submitted I'd like to run another function then the popup closes on the main mxml file, but I'm not sure how to go about doing this?

Here's my popup code:

    private var weightadd:weight_add; //POP UP ADD WEIGHT FORM 
    private function weightAdd():void {
    weightadd = new weight_add();
    PopUpManager.addPopUp(weightadd,this,true);
    PopUpM开发者_Python百科anager.centerPopUp(weightadd);
    }   

Currently in my weight_add.mxml file I'm using a button to close the popup, I'd like have this button close the popup and then call a function in my main.mxml file - I'm just wondering how I go about doing this.

<mx:Button x="186" y="83" label="Cancel" styleName="formbutton" id="cancel_button" click="PopUpManager.removePopUp(this);"/>


I found this example which seem to do the trick

http://bubutripathy.wordpress.com/2007/02/09/popup-login-window

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号