i remove the left and top from the div tooltip and place your code but unfortunitly its behaving the same as before...
in my gridview i have 10 or 25 rows per page and when i scroll down (ie browser scroll bar) and mouseover the gridview column the tooltip div is showign all the way at the very top and i cannot even see that and if i
scroll-up (ie) and mousover then its next to the gridview.
thoughts?
thanks.
Its all about coding!
--------------------------
Don't forget to click "Mark as Answer" on the post(s) that helped you.
soumen_ban
Member
71 Points
15 Posts
Re: show tooltip in gridview
Sep 10, 2007 08:43 AM|LINK
Hi,
The problem is there with the Top & Left property values defined statically in the <Div id="tooltip" >
Remove the properties from there:
document.write(
"<div id=\"tooltip\" style=\"position:absolute;visibility:hidden; padding:3px;border:1px solid #528AC6;\
;background-color:#ffdfd0; height: 19px; \"></div>");
And mention these dynamically in the showtip() function:
function showtip(text)
{
if (document.all&&document.readyState=="complete")
{
document.all.tooltip.innerHTML="<div vAlign=center><font SIZE=2>"+text+"</font></div>";
document.all.tooltip.style.top = (event.clientY + 15) +'px';
document.all.tooltip.style.left = (event.clientX + 15) +'px';
document.all.tooltip.style.visibility="visible";
}
}
Cheers,
Soumen
Soumen :)
Please mark the reply as Answer to your query if it Closes your query.
nisarkhan
Contributor
2402 Points
1472 Posts
Re: show tooltip in gridview
Sep 10, 2007 01:36 PM|LINK
i remove the left and top from the div tooltip and place your code but unfortunitly its behaving the same as before...
in my gridview i have 10 or 25 rows per page and when i scroll down (ie browser scroll bar) and mouseover the gridview column the tooltip div is showign all the way at the very top and i cannot even see that and if i scroll-up (ie) and mousover then its next to the gridview.
thoughts?
thanks.
--------------------------
Don't forget to click "Mark as Answer" on the post(s) that helped you.
nisarkhan
Contributor
2402 Points
1472 Posts
Re: show tooltip in gridview
Sep 11, 2007 06:43 PM|LINK
its working now!
for those who are in the same situation, here is how it worked by doing: document.documentElement.scrollTop
--------------------------
Don't forget to click "Mark as Answer" on the post(s) that helped you.