473,403 Members | 2,359 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

Tooltip error

43
Hi , here is my js script

Expand|Select|Wrap|Line Numbers
  1. var browser = (navigator.appName == "Microsoft Internet Explorer") ? "ie" : "other";
  2. var tooltip_move = "no";
  3.  
  4. function start_show(message, event) {
  5.     var is_tt_created = document.getElementById("tooltip");
  6.     is_tt_created.innerHTML = message;
  7.     is_tt_created.style.display = "block";
  8.  
  9.     var get_xmouse = (browser == "ie") ? window.event.clientX : event.clientX;
  10.     var get_ymouse = (browser == "ie") ? window.event.clientY : event.clientY;
  11.  
  12.     is_tt_created.style.top = get_ymouse + "px";
  13.     is_tt_created.style.left = get_xmouse + "px";
  14.     is_tt_created.innerHTML = message;
  15.  
  16.     tooltip_move = "yes";
  17. }
  18.  
  19. document.onmousemove = function(event) {
  20.     if (tooltip_move == "yes") {
  21.         var tooltip_id = document.getElementById("tooltip");
  22.         var set_xdiv = (browser == "ie") ? window.event.clientX : event.clientX;
  23.         var set_ydiv = (browser == "ie") ? window.event.clientY : event.clientY;
  24.  
  25.         tooltip_id.style.top = set_ydiv + "px";
  26.         tooltip_id.style.left = set_xdiv + "px";
  27.     }
  28. }
  29.  
  30. function stop_show() {
  31.     var tt_element = document.getElementById("tooltip");
  32.     tt_element.style.display = "none";
  33.     tooltip_move = "no";
  34. }
  35.  
and the html
[HTML]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link type="text/css" rel="stylesheet" href="style.css" />
<title>ToolTip - Tader</title>

<script type="text/javascript" src="js_file.js"></script>
</head>
<body>
<span onmouseover="javascript:start_show('testas msg', event);" onmouseout="javascript:stop_show();">Testas cia yra</span>

<div id="tooltip"></div>
</body>
</html>
[/HTML]

so this tooltip works five on ie6 but on ff it blinks why if i remove onmouseout it works five but i need it so can any1 help me plz
Mar 18 '08 #1
1 1274
acoder
16,027 Expert Mod 8TB
Not sure what you mean by blinking. It doesn't seem to. Also be aware of problems with getting mouse co-ordinates. Try something like this.
Mar 19 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: vMike | last post by:
If I try to get the tooltip and name of the image object that triggers the image button onclick event I get a late binding error. I can turn off option strict but is there any other way to get this...
2
by: Terence Lee | last post by:
Dear all, Anybody have some sample code for setting the TTF_TRANSPARENT style of a .net tooltip? Thx,
0
by: Yves Royer | last post by:
Hi, I'm currently writing an application (in VS 2005 bčta 2) and made some own user controls. In each user control I added a ToolTip object so i can set some tooltips on checkboxes etc. What...
0
by: Yves Royer | last post by:
Hi, My first post didn't show up so here's a second try. I'm currently writing an application (in VS 2005 bčta 2) and made some own user controls. In each user control I added a ToolTip object...
5
by: =?Utf-8?B?cGV0ZTE5Njk=?= | last post by:
I use Visual Studio 2005 and created a very simple Form with one button. I added a Tooltip for that button. It shows fine the first time I hover over that button. But if I let it disappear by the...
0
by: walve_wei | last post by:
<1>use the D3D control panel, enable the debug DLL and maximum validation,for D3D control panel ,you need to install the directx sdk. <2>Start up the debug monitor (<MSVC install...
6
by: john | last post by:
I have the following textbox setup with Text & ToolTip Bindings as follows; I'm using Visual Studio 2008 VB: <asp:TextBox ID="txtDay1" runat="server" Text='<%# Eval("Day1") %>'...
16
by: Charles Law | last post by:
I have to take this personally now. Tooltips have been flakey since the dawn of .NET, but to still have to put up with a disappearing tooltip in VS 2008 is getting beyond a joke. Tooltips have...
2
by: bluestarmoon | last post by:
Hello I am using a tooltip in one of my column in datagrid. I want to show only 1st 20 characters and rest of the text to be shown in tooltip . for this i need to write a function. here is...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.