Click to See Complete Forum and Search --> : Troubles closing windows


see07
August 27th, 2004, 04:20 PM
Hello:
If I open 2 windows thus:
function abre1()
{
window.open
(`2Sam7_1.htm','S71','resizable,height=350,width=700,scrollbars=yes')
;
}
function abre2()
{
window.open
(`2Sam7_2.htm','S72','resizable,height=350,width=700,scrollbars=yes')
;
}
</script>

And I have 2 hyperlinks that open 2 forms:
<a href="#" style="Z-INDEX:102; LEFT:58px; POSITION: absolute; TOP:
47px" onfiltered="_javascript:abre1(); return false">Seccion 1</a1>
<a href="#" style="Z-INDEX:103; LEFT:58px; POSITION: absolute; TOP:
87px" onfiltered="_javascript:abre2(); return false"> Seccion 2</a1>

In body I have:
<body MS_POSITIONING="Grid_Layout" bgColor="##ffcccc"
onfiltered= "_javascript: CerrarVentanas(); return false;">

In CerrarVentanas I have:
Function CerrarVentanas()
{
S71.window.close();
S72.window.close();
}

Why when user close main window doesn't close windows S71 & S72?

I'll appreciate your help.
A.L.

MRutledge
August 27th, 2004, 05:10 PM
puit this :
"_javascript: CerrarVentanas();"
in onunload event in the body

For example:

<body MS_POSITIONING="Grid_Layout" bgColor="#ffcccc"
onunload= "_javascript: CerrarVentanas(); ">