Javascript Needed?

Hi

i have one child form in my parent form,. if i m trying to close de parent form and still child form is open. then it should ask that are u want to close de child form also ?

Can anybody give me snippet of de code regarding this solution in javascript(web application)

DEV/"

Subject: Javascript Needed?

  1. declare a global var win

var win;

  1. assing the result of the window.open function to the var win.

function windowOpen(){

…

win = window.open(‘http://www.notes.net’)

…

}

  1. create a function to check if the window is open and if so, ask if it needs to be closed

function checkChild(){

if(win) {

if(typeof(win.closed)==‘unknown’ || win.closed) return

if(confirm(‘close the child?’)) win.close()

}

}

  1. in the body onUnLoad: onunload = “checkChild()”

Regards,

René

Subject: Javascript Needed?

If you open the child-form with window.open you can also use the html-parameter ‘dependend’. All dependend Windows will be closed with the parent.

Regards

Edit: but that is without asking before