View Full Version : dhtmlwindows hooks

09-15-2008, 03:37 PM
1) Script Title: dhtmlwindows

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex8/dhtmlwindow/index.htm

3) Describe problem: I am looking for a way to track the dhtmlwindows that are open. I've been tryin' many different ways, but just haven't locate a hook that I can use to do so.
I am not looking at the information to be stored remotely, just during the user's present session.

09-16-2008, 12:33 AM
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 (http://www.dynamicdrive.com/forums/showthread.php?t=25427), the below code when run tells you the IDs of the currently opened windows on the page:

<script type="text/javascript">

function getopenedwindows(){
for (var i=0; i<dhtmlwindow.tobjects.length; i++){
if (dhtmlwindow.tobjects[i].style.display=="block")


<a href="#" onClick="getopenedwindows()">Test</a>

09-16-2008, 02:58 AM
Thank you! That was the info I needed!