popup editor close using javascript

popup editor close using javascript

  
Hi,
I am looking for a way to close pop up editor using javascript as i dont have any operation to be done on server in popup, how can it be done?

Thanks,
Thiru
Hello,

There are probably more ways of doing it, but this is one I can think of:

Removing html from dom:
$('.os-internal-Popup').remove();
$('.os-internal-ui-widget-overlay').remove();

Best regards,
Cristiano
 
Thanks for answering, is this a standard? i mean the css classes used in script are public, which may not change on upgrades right?

Thanks again,
Thiru
Thats a good question, honestly if they change the classes of popup in the future I can't tell you for sure : |

I've tested this on 9.0 and 9.1 BALI.

But assuming they are CSS classes it's never as safe as just calling the server side action.

Best regards,
Cristiano
thanks, Cristiano, yeah you are right, i just want to avoid server call just to close the pop up. 

Another way of skinning the cat:

run the same script the Popup_Editor_Close action does.

parent.RichWidgets_Popup_Editor_Close()


regards

AB