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

Home Posts Topics Members FAQ

How to add Tooltips to image at runtime ?

I have created a VB app that generates a wireless network status map
several times a day.
The app adds hidden controls in specific areas of the image (on a
form) with extra info in the tooltips so that the user can hover over
a site and see the extra info pop up.

I have been asked to host this info on a web page, which I have done
for the map only - I copy and overwrite the source image of a
simple ASP.

Question: How should I go about adding the tooltip functionality?
Remember this has to be done at runtime. Even the number of sites can
change.

In VB I added a new control to the image for each site in the database
at its Lat and Lon but I am not sure how to approch this for an ASP.
A good analogy would be a web page with a weather map of the USA
where hovering over bad weather pops up a tooltip showing the current
temp etc
Any suggestions?

Thanks

Bill
Jul 19 '05 #1
7 10572
Bill, I would create a grid overlay of the graphic using a transparent
graphic to the grid size..

Then set coordinates dynamically from the data

--
-dlbjr

invariable unerring alien
Jul 19 '05 #2
Gazing into my crystal ball I observed bill.. <b@c.com> writing in
news:i6********************************@4ax.com:
A good analogy would be a web page with a weather map of the USA
where hovering over bad weather pops up a tooltip showing the current
temp etc


If you're going to be using an image map, then use both the Alt attribute
and Title attribute in the Area element.

--
Adrienne Boswell
Please respond to the group so others can share
http://www.arbpen.com
Jul 19 '05 #3
<img src=myimage.jpg alt="You are hovering over the great state of Wyoming"
Title="Up yours">

"Adrienne" <ar****@sbcglobal.net> wrote in message
news:Xn****************************@207.115.63.158 ...
Gazing into my crystal ball I observed bill.. <b@c.com> writing in
news:i6********************************@4ax.com:
A good analogy would be a web page with a weather map of the USA
where hovering over bad weather pops up a tooltip showing the current
temp etc


If you're going to be using an image map, then use both the Alt attribute
and Title attribute in the Area element.

--
Adrienne Boswell
Please respond to the group so others can share
http://www.arbpen.com

Jul 19 '05 #4
On Mon, 15 Sep 2003 17:18:45 -0500, "dlbjr" <do******@do.u> wrote:
Bill, I would create a grid overlay of the graphic using a transparent
graphic to the grid size..

Then set coordinates dynamically from the data

Ok but how do I reference it in the correct location? - I am pretty
much a beginner at asp stuff!

How do I say add a tooltip at x=10, y = 30 and another at x= 100,
y=100

An example would really help

Thanks

Bill
Jul 19 '05 #5
Bill,
Here is a simple html with javascript.
Save as a html and load in your browser.
I have commented the section of javascript
where you need to add logic.

<html>
<head>
<title></title>
<script language="javascript">
function getCoord(e){
var x = e.layerX || e.offsetX ;
var y = e.layerY || e.offsetY ;
hide();
show(x,y);
}
function show(x,y){
popup.value = getnote(x,y)
popup.style.left = x + 15
popup.style.top = y + 36
popup.style.height = 50
popup.style.width = 100
}
function hide(){
popup.value = ""
popup.style.height = 0
popup.style.width = 0
}
function getnote(x,y){
/**
Use server side ASP logic
to create client side logic here
Example:
Have a 2 Dimensional array full of messages to use.
*/
return "x = " + x + " , y = " + y;
}
</script>
<style>
..message
{
position:absolute;
background-color:yellow;
color:black;
border-color:black;
height:0;
width:0
}
</style>
</head>
<body>
<input type=button class="message" id="popup">
<img src="pic.jpg"
style="cursor: hand;"
width="300"
height="300"
onmousemove="getCoord(event)"
onmouseout="hide()"/>
</body>
</html>

HTH,

-dlbjr

Discerning resolutions for the alms
Jul 19 '05 #6
"bill.." <b@c.com> wrote in message
news:i6********************************@4ax.com...
Question: How should I go about adding the tooltip functionality?
Remember this has to be done at runtime. Even the number of sites can change.


I think the image map as Adrienne and Bubbles described is the way to
go, but there is something in your terminology (runtime) that hints at
some expectations that you will not get.

There is really no such thing as "run time" in the sense I think you
mean it. In ASP "runtime" occurs only as the server generates the
page. Runtime ends as soon as the Server finishes sending the page to
the browser. By the time you can view the page in the browser, the
"runtime" has already come to an end. The page will never update no
matter how long you sit and watch it. The only way to display new
changes is to send a new request to the server and have it send a new
page based on new data. Now you could have the page rigged to
automatically refresh every few seconds, like maybe 15 seconds or
something. But even that isn't really "live" data, it is just static
data that is updated every 15 seconds.

The only way to have "live" data is to use some type of streaming
(like with video) or to have some kind of component on the client that
maintains a constant connection to the server (which has nothing to do
with ASP).
--

Phillip Windell [CCNA, MVP, MCP]
pw******@wandtv.com
WAND-TV (ABC Affiliate)
www.wandtv.com
Jul 19 '05 #7
On Wed, 17 Sep 2003 15:09:11 -0500, "Phillip Windell"
<pw******@wandtv.com> wrote:
"bill.." <b@c.com> wrote in message
news:i6********************************@4ax.com.. .
Question: How should I go about adding the tooltip functionality?
Remember this has to be done at runtime. Even the number of sites

can
change.


I think the image map as Adrienne and Bubbles described is the way to
go, but there is something in your terminology (runtime) that hints at
some expectations that you will not get.

There is really no such thing as "run time" in the sense I think you
mean it. In ASP "runtime" occurs only as the server generates the
page. Runtime ends as soon as the Server finishes sending the page to
the browser. By the time you can view the page in the browser, the
"runtime" has already come to an end. The page will never update no
matter how long you sit and watch it. The only way to display new
changes is to send a new request to the server and have it send a new
page based on new data. Now you could have the page rigged to
automatically refresh every few seconds, like maybe 15 seconds or
something. But even that isn't really "live" data, it is just static
data that is updated every 15 seconds.

The only way to have "live" data is to use some type of streaming
(like with video) or to have some kind of component on the client that
maintains a constant connection to the server (which has nothing to do
with ASP).

Good point but all I need is a refresh every 5 minutes or so and I
will be fine

Thanks

Bill
Jul 19 '05 #8

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

Similar topics

0
by: Bonna | last post by:
Hi, I've set up a helpsystem for my application using html help 1.x and the dotnet HelpProvider object. It's annoying that that you have to fill in the tooltips yourself (for providing help on...
1
by: David Ei | last post by:
I'm working on a C# Windows Forms application that is leaking memory. I've been using the SciTech NetMem Profiler 2 (A really great tool, BTW) to track down leaks. I've found one related to...
0
by: ADavis | last post by:
We have an existing ActiveX control that plots data points over an image. When the mouse is moved over these points, a tool tip is supposed to be displayed indicating information about the point....
1
by: Wayne Aprato | last post by:
Tooltips in Access have not worked on my machine for a long time despite several reinstalls of the operating system and applications at fairly regular intervals. I have finally pinned down the...
1
by: bullshark | last post by:
VS2003 1) If you don't have one, add a tooltip control to your design canvas. 2) open the properties for the control that gets the tool tip 3) type in all your text in the 'tooltip on tooltip1'...
5
by: VBTricks.de.vu Webmaster | last post by:
Hello, I'm currently trying to port a piece of code from VB6 to VB.net which enables my application to display balloon tooltips. Unfortunately it doesn't seem to work. This is the code VB: ...
9
by: timnels | last post by:
I have an issue where I have a user control that is launched into a floating form. At some point later, I allow the user to "unfloat" the user control by reparenting it on a split container in...
11
by: Rich Grise | last post by:
I've got a photo gallery on my client's website, and it has been suggested that, rather than show the whole thing full-size on one page (about 9 full- page images), I should put a thumbnails page...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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,...
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,...
1
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
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: 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 ...

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.