modal window can return a value to parent window's calling function, so based on its value you can either change parent window variables or call any function. It is only possible when your child modal window is closing.
here it is how.
// parent window JS
retval= window.showModalDialog( "mynewpage.jsp", myArguments, "dialogHeight: 100px; dialogWidth: 400px; edge: Raised; center: Yes; resizable: Yes; status:Yes ; scroll:Yes;"); resetTimer(retval);
// in child window JS i.e. mynewpage.jsp
function closeMe() { window.returnValue="60"; window.close(); }
great suggesstion reajendran!!!!!!i was looking for this solution for days!!!!now please tell me how can i get the value of modal window variable in parentwindow
ReplyDeletePlease see that in parent window I have declared a variable called
ReplyDelete"retval" value will be populated in this variable on close of modal window.