Flex opens a new window, passes the main window data to the child window and returns to _flex

Source: Internet
Author: User
First of all, my needs:

The main window opens the child window, and the main window has data passed to the Open child window.

Returns the main window directly when the child window closes.

-----------------------------------------------------------------------------------------------

In the beginning, my approach is:

When the main window opens the child window, it this.visible=false immediately, that is, the main window is hidden.

Executes the this.parent.visible=true before the child window closes, showing the main window, then Popupmanager.removepopup (this);.

This method to open the child window is normal, return to the main window is not normal, do not know is God horse reason,

Know the hope to inform one or two.

-----------------------------------------------------------------------------------------------

Then I thought of a way to meet my needs:

1. Open the child window in a modeless manner.

2. Hide the parent window

3. Transmit data to the child window.

4. The child window opens the page where the parent window is located.

-----------------------------------------------------------------------------------------------

The main code for the parent window is as follows:
Copy Code code as follows:

var wnd:desk=new Desk ()//Create child window
Popupmanager.addpopup (Wnd,this,false)//modeless mode Popup
This.visible=false; Hide parent window
wnd.lbdeskid.text=deskid;//Pass data to child windows
wnd.lbdeskpos.text=deskpos;//Pass data to child windows

The main code for the child window is as follows:
Copy Code code as follows:

var strurl:urlrequest = new URLRequest ("socket.html");//Open the page where the parent window is located
Navigatetourl (strURL, "_self");//Open
Popupmanager.removepopup (this) in the same window;//exit child window

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.