cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

Closing a parent window when the modal child is closed

sdinh
6-Contributor

Closing a parent window when the modal child is closed

I have a mashup with a button that uses a hidden navigation widget to open a modal child window that is just a confirmation message.  When the child window is closed I would like for the parent to also close so the user does not click the button again.  Looking for the cleanest way to handle this.  Any help would be appreciated

7 REPLIES 7
PaiChung
22-Sapphire I
(To:sdinh)

Expression widget that is triggered upon popup closed event

I think you can use window.close()

 

sdinh
6-Contributor
(To:PaiChung)

Thanks for the response!  I bound the Expression 'Evaluate' event service to the Navigation widget's PopupClosed event with an Expression of "close()" however that did not close the parent.  "window" appears to be a reserved word that gives an error so window.close() doesn't seem to be usable.  Any thoughts? 

PaiChung
22-Sapphire I
(To:sdinh)

You could try just close()

else you may have to create a custom extension to bring in that script.

Ascherer17
14-Alexandrite
(To:PaiChung)

Stumbled upon this, thankfully.  I had been trying to figure out how to initiate the print dialog (ctrl+p) from an expression widget. 

I just tested close() and print() in an expression widget triggered by a button and they seem to work.

Hi PaiChung,

 

close(); function working when the current tab is triggered from a parent.

 

If I copy the URL and put into a new window, not working.

 

Do you have the solution for the same?

 

Regards,

 

Janakiraman P

PaiChung
22-Sapphire I
(To:Janakiraman)

Can you explain this a little better please?

What exactly does it mean to 'copy the url into a new window'?

Top Tags