Pregunta

I'm using a jQuery plugin for notifications: http://needim.github.com/noty/

This is the way I call the method that displays the notification:

noty({force: true, timeout: false, text: 'Hello noty', type: 'information'});

The code works fine, but now, being in a modal window, I need to execute that call in the opener window as soon as I close the modal window... I think I should use window.opener but don't know how to do it for this case.

¿Fue útil?

Solución

you could define a JS function in your opener window:

function invokeSuccessNotification(msg){
        noty({force: true, timeout: false, text: 'Hello noty', type: 'information'});

    }

then, in your modal window, call that method like this:

window.opener.invokeSuccessNotification();
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top