PDA

View Full Version : Intermittently DHTML Window won't close



ronman
01-30-2009, 06:29 PM
1) Script Title: DHTML Window Widget

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

3) Describe problem:
At seemingly random times, maybe every 4th or 5th opening of a DHTML Window, the close button quits working. The minimize button always works. I put an alert in the close() method and it never fires when this happens (it does fire when the window is working normally).

If I put a javascript link to close the window (self.close()) in html and place that within the DHTML window it always works, but that doesn't clean things up and is inconvenient.

What could be going on?

Nile
01-30-2009, 08:52 PM
Please post a link to the page on your site that contains the problematic script so we can check it out.
Please include your code so that we can take a look at it, we can't do much without it.

Please do the above before we can proceed helping you.

ronman
01-30-2009, 10:15 PM
1) Script Title: DHTML Window Widget

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

3) Describe problem:
At seemingly random times, maybe every 4th or 5th opening of a DHTML Window, the close button quits working. The minimize button always works. I put an alert in the close() method and it never fires when this happens (it does fire when the window is working normally).

If I put a javascript link to close the window (self.close()) in html and place that within the DHTML window it always works, but that doesn't clean things up and is inconvenient.

What could be going on?


The site is:
test.ideatree.us
Then click 'demo' on the left, and then select 'What Can You Do With It?'

Then click a few times on any of the nodes in the graph at the bottom, and
immediately close the dhtml window with the close button.

NOTE: I believe the problem is conflicting onclose events, because the problem doesn't happen when the tooltip code is turned off. So apparently there's a conflict with the 'onclose' event listener. I disabled those events in the other code, but that didn't fix it. So what I'm looking for now is how and where DHTML Window captures the onclose event and how to make it register consistently.


Here's my code:

var popupwin;
function nodeActions(nodename,url,nodeID,nodeType,label,nodeownerID,mobile) {
var action="./NodeActions.php5";
popupwin=dhtmlwindow.open('nodeactions', 'iframe', action, 'Box Options', 'width=490px,height=490px,left=30,left=300px,top=30px,resize=0,scrolling=1');
return 0;
}

Nile
01-30-2009, 11:00 PM
It doesn't work at all... Is that what you need help with?

ronman
01-31-2009, 05:07 AM
no, as you see on the site, it works...perhaps 3 out of 4 times. But every once in awhile the window will fail to close when you click the close button. Sometimes ten windows in a row may close perfectly, and then one will get stuck and ignore the close button no matter how many times you click it (the window flashes when the close button is clicked but doesn't close). it is as if the onclick event (wherever that gets set) is stuck or conflicting with something.

Nile
02-01-2009, 12:48 AM
I don't see where your calling noedActions anywhere on the page.

I also don't see where your including the file/internally adding the function to the page. ;)

ronman
02-02-2009, 03:52 PM
Those are obvious, if I hadn't put them in the dhtml window wouldn't come up at all, and it does no good replicating such obvious code here. Did you look at the website address I sent, to see the DHTML windows coming up? Did you read my description of the problem and what I suspect is the problem? This is on the level of "did you plug in your appliance". Can we get past the newbie stuff? Arrrgggh.