Results 1 to 5 of 5

Thread: Cool DHTML Tooltip II - IE Error

  1. #1
    Join Date
    Nov 2005
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Cool DHTML Tooltip II - IE Error

    1) Script Title: Cool DHTML Tooltip II

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...mltooltip2.htm

    3) Describe problem:
    IE Problem: tooltip pageX is null or not an object
    it works fine on Firefox.

  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

    Works fine here! Did you edit the code of the script? Like possibly around here:

    Code:
    var ie=document.all
    var ns6=document.getElementById && !document.all
    var enabletip=false
    or here:

    Code:
    function positiontip(e){
    if (enabletip){
    var nondefaultpos=false
    var curX=(ns6)?e.pageX : event.clientX+ietruebody().scrollLeft;
    var curY=(ns6)?e.pageY : event.clientY+ietruebody().scrollTop;
    //Find out how close the mo . . .
    OR - Are you using it on a page with another script? If so, the other script may have redefined ns6 or document.all. If so, some changes would need to be made to one or the other of the scripts or, one would need to be removed from the page.

    If this is the problem, a link to your problem page would help verify it and suggest the best remedy.
    - John
    ________________________

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

  3. #3
    Join Date
    Nov 2005
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    no i didnt changed anything .. by the way i fixed it

    what i did

    changed this lines
    Code:
    var curX=(ns6)?e.pageX : event.clientX+ietruebody().scrollLeft;
    var curY=(ns6)?e.pageY : event.clientY+ietruebody().scrollTop;
    with this
    Code:
    // IE Fix by xam
    if (!e)
    {
    var e = window.event
    }
    
    // IE Fix by xam
    if (e.pageX || e.pageY)
    {
    curX = e.pageX;
    curY = e.pageY;
    }
    else if (e.clientX || e.clientY)
    {
    curX = e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft;
    curY = e.clientY + document.body.scrollTop + document.documentElement.scrollTop;
    }
    thx for your help

  4. #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

    That shouldn't have been necessary unless there was a script conflict.

    Glad it's working for you.
    - John
    ________________________

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

  5. #5
    Join Date
    Nov 2005
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Yes it worked

    By the way, i want to include a function into this script which will show me a "Loading" message for images..

    Any help would be nice.

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
  •