Each instance of DHTML window defined on your page is stored inside the array dhtmlwindow.tobjects[]. Following the same logic as how to close any previously opened DHTML windows before opening the present, the below code when run tells you the IDs of the currently opened windows on the page:
Code:
<script type="text/javascript">
function getopenedwindows(){
for (var i=0; i<dhtmlwindow.tobjects.length; i++){
if (dhtmlwindow.tobjects[i].style.display=="block")
alert(dhtmlwindow.tobjects[i].id)
}
}
</script>
<a href="#" onClick="getopenedwindows()">Test</a>
Bookmarks