473,473 Members | 2,125 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Tool Tip / Pop up text box

Hello Everyone,

We are using javascript's tooltip (pop up on mouse over )function. The
problem we are having is as we go scroll two or three pages deep in to
the html page our tool tip /pop up gets farther away from the position
where it is supposed to be. It happens to the extend that at certain
point we don't see the tool tip at all.

Is there a way to fix the position of the tool tip /pop up, so that no
matter how deep we are in the page the tool tip is always close to the
link or mouse over text. We are using an external javascript and style
sheet file. Here is the code we are using:

Code for the javascript file:

function toolTips(evt,currElem,left) {
// Creates the tool tip for Internet Explorer
if ((navigator.appName == "Microsoft Internet Explorer") &&
(parseInt(navigator.appVersion) >= 4)) {
tipWin = eval("document.all." + currElem + ".style");
// Number at end of next line indicates the number of pixels from the
bottom of the cursor the tip is
tipWin.top = parseInt(evt.y)+document.body.scrollTop+10;
// Number at end of next line indicates the number of pixels to the
left of the cursor the tip is
tipWin.left = Math.max(2,parseInt(evt.x)+document.body.scrollLef t+left);
tipWin.visibility = "visible";
tipWin.status = "";
}

// Creates the tool tip for Netscape
if ((navigator.appName == "Netscape") &&
(parseInt(navigator.appVersion) >= 4)) {
tipWin = eval("document." + currElem);
// Number at end of next line indicates the number of pixels from the
bottom of the cursor the tip is
tipWin.top = parseInt(evt.pageY)+2;
// Number at end of next line indicates the number of pixels to the
left of the cursor the tip is
tipWin.left = Math.max(2,parseInt(evt.pageX)+ left);
tipWin.visibility = "visible";
tipWin.status = "";
}
}

function tipDown(currElem) {
// Closes the tool tip for Internet Explorer
if ((navigator.appName == "Microsoft Internet Explorer") &&
(parseInt(navigator.appVersion) >= 4)) {
tipWin = eval("document.all." + currElem + ".style");
tipWin.visibility = "hidden";
}
// Closes the tool tip for Netscape
if ((navigator.appName == "Netscape") &&
(parseInt(navigator.appVersion) >= 4)) {
tipWin = eval("document." + currElem);
tipWin.visibility = "hidden";
}
}
Code in the Style Sheet file:
#tipWin1,#tipWin2
{position:absolute;
visibility:hidden;}

..tipWinStyle {background-color:#FFFFDD;
layer-background-color:#FFFFDD;
border-color:#000000;
border-width:1px;
border-style:solid;
font-family:arial, helvetica, sans-serif;
font-size:9pt;
padding-left:2px;
padding-right:2px;}

H5.tipWinStyle
{

border-width:0px;
color: #800000;
font-weight: bold;
background-color : transparent;
Jul 23 '05 #1
1 3196
Vandana Rola wrote:
Hello Everyone,

We are using javascript's tooltip (pop up on mouse over )function. The
problem we are having is as we go scroll two or three pages deep in to
the html page our tool tip /pop up gets farther away from the position
where it is supposed to be. It happens to the extend that at certain
point we don't see the tool tip at all.

Is there a way to fix the position of the tool tip /pop up, so that no
matter how deep we are in the page the tool tip is always close to the
link or mouse over text. We are using an external javascript and style
sheet file. Here is the code we are using:

<snip />

I can only suggest using better code:
http://www.klproductions.com/kltooltips.html

--
Vladdy
http://www.klproductions.com
Jul 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Paul Kooistra | last post by:
I need a tool to browse text files with a size of 10-20 Mb. These files have a fixed record length of 800 bytes (CR/LF), and containt records used to create printed pages by an external company. ...
14
by: Akseli Mäki | last post by:
Hi, Hopefully this is not too much offtopic. I'm working on a FAQ. I want to make two versions of it, plain text and HTML. I'm looking for a tool that will make a plain text doc out of the...
1
by: Donnie | last post by:
Hello All I am trying to find some information on how to design/develop a SQL Query tool embedded in an ASP.NET web application What I would like to have is a tool that helps a user write SQL...
4
by: Steven Ramacher | last post by:
I am having a little issue with VS 2005. I am trying to use the ASP.NET configuration manager and have not had any success launching the application. No matter what I do I get an error message that...
2
by: Zhang Weiwu | last post by:
Hello. I am looking for a commandline tool to take an html document (or html document segment, a.k.a. without beginign "<html><head>..</head><body>") and process it by removing all css style...
5
by: TonyJ | last post by:
Hello!! Is it anyone that have some experience using a good case tool that support C# design in using UML. For example reverse engineering. I have used the together case tool when I worked with...
7
by: ab3331 | last post by:
I need a tool that acts like a browser, but instead of actually rendering a page, it explains in English exactly what rules it's interpreting. This would make it simple to see which rules are...
4
by: Anastasios Hatzis | last post by:
I'm looking for a pattern where different client implementations can use the same commands of some fictive tool ("foo") by accessing some kind of API. Actually I have the need for such pattern for...
26
by: webrod | last post by:
Hi, I have some php pages with a lot of HTML code. I am looking for a HTML validator tool (like TIDY). TIDY is not good enough with PHP tags (it removes a lot of php code). Do you have any...
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.