PDA

View Full Version : Cool DHTML Tooltip II - IE Error



xam
04-30-2007, 05:42 PM
1) Script Title: Cool DHTML Tooltip II

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex5/dhtmltooltip2.htm

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

jscheuer1
04-30-2007, 09:21 PM
Works fine here! Did you edit the code of the script? Like possibly around here:


var ie=document.all
var ns6=document.getElementById && !document.all
var enabletip=false

or here:


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.

xam
05-01-2007, 10:09 PM
no i didnt changed anything .. by the way i fixed it :)

what i did

changed this lines


var curX=(ns6)?e.pageX : event.clientX+ietruebody().scrollLeft;
var curY=(ns6)?e.pageY : event.clientY+ietruebody().scrollTop;


with this


// 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

jscheuer1
05-02-2007, 04:55 AM
That shouldn't have been necessary unless there was a script conflict.

Glad it's working for you.

xam
05-02-2007, 08:09 PM
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.