Results 1 to 7 of 7

Thread: Help with DHTML Window widget (v1.03)

  1. #1
    Join Date
    Aug 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Help with DHTML Window widget (v1.03)

    1) DHTML Window widget (v1.03)

    2) http://www.dynamicdrive.com/dynamici...ndow/index.htm

    3) I just need some guidance on how to use the onclose event of this script. The problem that I having is that after I close the popup window, mouseovers on the parent page no longer work, if I refresh the parent page, they do work. What I would like to know is how can I use the onclose event of this script to put focus back on the main window?

    Please keep in mind, I know very little about javascript.

    Thanks,
    chaos.

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    That most likely means some sort of error occured with your custom code you added within the DHTML window's onclose. You can confirm this by removing that code, and see if the problem persists.

  3. #3
    Join Date
    Aug 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Help with DHTML Window widget (v1.03) Reply to Thread

    Thanks for your reply. I haven't added anything to the onclose event. My code looks is shown below. Any help would be much appreciated.

    Mouseover and popup
    Code:
    <area href="#" shape="rect" coords="199,362,214,381" onClick="ajaxwin=dhtmlwindow.open('ajaxbox', 'ajax', 'popup.aspx?id=10', '222', 'width=650px,height=400px,left=300px,top=100px,resize=0,scrolling=1'); return false" onMouseover="ddrivetip('<H1>222 - adfasdf</H1><img src=logos/blanklogo.gif />');" onMouseout="hideddrivetip()"/>
    The onclose event of the widget looks like this:




    Code:
    // -------------------------------------------------------------------
    close:function(t){
    	try{
    		var closewinbol=t.onclose()
    	}
    	catch(err){ //In non IE browsers, all errors are caught, so just run the below
    		var closewinbol=true
     }
    	finally{ //In IE, not all errors are caught, so check if variable isn't defined in IE in those cases
    		if (typeof closewinbol=="undefined"){
    			alert("An error has occured somwhere inside your \"onclose\" event handler")
    			var closewinbol=true
    		}
    	}
    	if (closewinbol){ //if custom event handler function returns true
    		if (t.state!="minimized") //if this window isn't currently minimized
    			dhtmlwindow.rememberattrs(t) //remember window's dimensions/position on the page before closing
    		t.style.display="none"
    	}
    	return closewinbol
    },

  4. #4
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    At a glance I don't see anything wrong with your code. Try removing the ddtooptip code within your link:

    Code:
    onMouseover="ddrivetip('<H1>222 - adfasdf</H1><img src=logos/blanklogo.gif />');" onMouseout="hideddrivetip()"
    There could be a conflict occuring somewhere. If you have a link to the problem page, it'd make things a lot easier.

  5. #5
    Join Date
    Aug 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hello,

    Thanks again for your help. You can see the page at

    http://www.5gears.net/mjpa/


    Thanks,
    Chaos

  6. #6
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Ok, looks like the problem is with a conflict with the onmousemove event, used by both the DHTML Window widget and DHTML Tooltip script. Someone else had the exact problem a while ago, in which he posted his solution: http://www.dynamicdrive.com/forums/s...ad.php?t=21832 If you can follow his logic (bottom of the thread), it should work for you as well.

    Unfortunately until I have more time to examine the issue myself, I won't be able to provide a fix. The DHTML Window is a rather complex script, so I don't want to issue a quick fix to one issue that may cause some problems elsewhere within the script.

  7. #7
    Join Date
    Aug 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thank you very much for your help!!

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
  •