Click to See Complete Forum and Search --> : window.open


sridevi_sun
03-21-2003, 04:36 AM
Hi all,

I have the following Javascript code,

function search_window_dist_name(){
window.open("../servlet/Controller","child1","scrollbars,,width=500,height=400");
alert('window closed');
}

I need the alert to be invoked only after the child window "child1" is closed.

But it is not happening so, as and when the child window is opened the alert window is also opening.

Kindly help me out to solve this problem

sridevi s

gil davis
03-21-2003, 05:44 AM
function search_window_dist_name(){
child1 = window.open("../servlet/Controller","child1","scrollbars,width=500,height=400");
child1.onunload = "alert('window closed')";
}