Results 1 to 7 of 7

Thread: 2 script doesn't works together, any fix?

  1. #1
    Join Date
    Nov 2009
    Posts
    5
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default 2 script doesn't works together, any fix?

    1) Script Title: Cool DHTML Tooltip II and DHTML Window widget (v1.1)

    2) Script URL (on DD):

    http://www.dynamicdrive.com/dynamici...mltooltip2.htm
    http://www.dynamicdrive.com/dynamici...ndow/index.htm

    3) Describe problem:

    Added both script to my web page but after opening a popup window (dhtmlwindow), dhtmltooltip won't works when hovering over a div anymore. Really need them to be working, is there any fix to this?

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    There is no obvious conflict (such as an onload conflict), but there may be an error or something that can be detected from your live page that may help resolve this:

    Please post a link to the page on your site that contains the problematic code so we can check it out.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. The Following User Says Thank You to jscheuer1 For This Useful Post:

    xJack (11-24-2009)

  4. #3
    Join Date
    Nov 2009
    Posts
    5
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    Thanks for your reply, jscheuer1. Here's the link to the page on my site: http://habboemotion.com/?go=rares/showrares.php

  5. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    As near as I can tell:

    Your page is in violation of Dynamic Drive's usage terms, which, among other things, state that the script credit must appear in the source code of the page(s) using the script. Please reinstate the notice first.


    As a result, I can't see where on the page that either script is. But I was able to determine that they both were associated with the page somehow, and to find the problem. But I don't even know what filenames you are using for these scripts. So I'll just refer to the one where change would be most beneficial by its descriptive title, "Cool DHTML Tooltip II". In that script there is (at the end):

    Code:
    document.onmousemove=positiontip
    Change that to:

    Code:
    if (document.addEventListener)
     document.addEventListener('mousemove', positiontip, false);
    else if (document.attachEvent)
     document.attachEvent('onmousemove', positiontip);
    That should do it!
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  6. The Following User Says Thank You to jscheuer1 For This Useful Post:

    xJack (11-24-2009)

  7. #5
    Join Date
    Nov 2009
    Posts
    5
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    Thanks a lot for your reply, every script on that site was passed down since a year ago thus didn't notice the violation, really sorry. Those two scripts are located at the bottom:

    http://habboemotion.com/scripts/xtra.js (dhtml window)
    http://habboemotion.com/scripts/hover.js (dhtml tooltip)

    Your code above didn't solve this, and I just found out that it's after you clicked on the "close" of dhtml window, dhtml tooltip then stopped working. I'm thinking it could be part of this code being the same as the tooltop making them crashing with each other (Not sure if that's the case):

    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
    		if (window.frames["_iframe-"+t.id]) //if this is an IFRAME DHTML window
    			window.frames["_iframe-"+t.id].location.replace("about:blank")
    		else
    			t.contentarea.innerHTML=""
    		t.style.display="none"
    		t.isClosed=true //tell script this window is closed (for detection in t.show())
    	}
    	return closewinbol
    },
    EDIT: Placed credits for scripts just below them.

  8. #6
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Works here, perhaps you need to clear the browser's cache.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  9. The Following User Says Thank You to jscheuer1 For This Useful Post:

    xJack (11-24-2009)

  10. #7
    Join Date
    Nov 2009
    Posts
    5
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    Yes, it's working already. Thanks a lot for your help, really appreciated it!

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
  •