How to close a glide overlay window with onclick function.

cwmurphy
Mega Expert

I've created a button for end users to select a shipping method for purchase requests.   A glide overlay window pops up and gives them their choices.   Once they make a selection, there is a button called "Ship It" that they click.   I would like this button to close the glide overlay window.   So far, every attempt has been unsuccessful.   Does anyone know what I would put in my UI Page function to get this window to close one they click the "Ship It" button?  

18 REPLIES 18

Anurag Tripathi
Mega Patron
Mega Patron

Hi Chris,



have you tried this?



//Destroy the current dialog window.


GlideDialogWindow.get().destroy();


-Anurag

I have tested with this and nothing happens.   I have an alert set in the function to run in order to see if it's working.   when I put GlideDialogWindow.get().destroy(); in the code, the alert fails to run.  


Anurag Tripathi
Mega Patron
Mega Patron

Also check this, last input on this post by Jonathan


Could you someone give me more information regarding glideOverlay?


-Anurag

I checked into the GlideBox properties.   When changing it from a GlideOverlay to a GlideDialogWindow, everything breaks.   The button that I click in order to get the window to popup changes shape and the screen grays out.   Nothing ever shows up.   When changing the code in the UI Macro back to a GlideOverlay, the window then pops open.   If it makes any difference, the button I have created is scripted into the Shopping Cart above the Add To Cart button.