ringo
01-14-2005, 03:44 AM
<HTML>
<HEAD>
<SCRIPT>
function closeIt()
{
event.returnValue = "Testing";
}
</SCRIPT>
<FRAMESET ROWS="50%,50%">
<FRAME NAME="One" SRC="one.php">
<FRAME NAME="Two" SRC="two.php">
</FRAMESET>
</HEAD>
<BODY onbeforeunload="closeIt()">
</BODY>
</HTML>
If I put the codes as above, the function onbeforeunload="closeIt()" does not work at all but I can managed to see the frames. If I put the function onbeforeunload="closeIt()" before the frameset, I cannot view the frames at all and javascript function is working. How can I solve this so that I can view the frames and want the javascript function to work as well?
<HEAD>
<SCRIPT>
function closeIt()
{
event.returnValue = "Testing";
}
</SCRIPT>
<FRAMESET ROWS="50%,50%">
<FRAME NAME="One" SRC="one.php">
<FRAME NAME="Two" SRC="two.php">
</FRAMESET>
</HEAD>
<BODY onbeforeunload="closeIt()">
</BODY>
</HTML>
If I put the codes as above, the function onbeforeunload="closeIt()" does not work at all but I can managed to see the frames. If I put the function onbeforeunload="closeIt()" before the frameset, I cannot view the frames at all and javascript function is working. How can I solve this so that I can view the frames and want the javascript function to work as well?