<body onbeforeunload="Javascript:closeIt()">
<script type="text/javascript">
function closeIt(){
if (document.getElementById("ListBox1").options.length>0)
{event.returnValue = "Confirmation message.";}
}
</script>
No, this is as close you get. And when you think it through, whatever is displaying in a browser window is not important if user or system needs to close that application. A confirmation that permits the close needs to be there.msvidron said:allows the user to close the page. Any way to prevent this?