Results 1 to 7 of 7

Thread: Intermittently DHTML Window won't close

  1. #1
    Join Date
    Jul 2008
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Intermittently DHTML Window won't close

    1) Script Title: DHTML Window Widget

    2) Script URL (on DD):
    http://www.dynamicdrive.com/dynamici...ndow/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?

  2. #2
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    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.
    Jeremy | jfein.net

  3. #3
    Join Date
    Jul 2008
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by ronman View Post
    1) Script Title: DHTML Window Widget

    2) Script URL (on DD):
    http://www.dynamicdrive.com/dynamici...ndow/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;
    }

  4. #4
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    It doesn't work at all... Is that what you need help with?
    Jeremy | jfein.net

  5. #5
    Join Date
    Jul 2008
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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.

  6. #6
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    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.
    Jeremy | jfein.net

  7. #7
    Join Date
    Jul 2008
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •