Julia,
It looks like there are two areas in the file you are going to need to drive through
data.
var tip=new Array
tip[0]='This is the state where I was born<br>Minnesota'
tip[1]='This is the state of Pennsylvania'
tip[2]='Sample tooltip without a link, <BR>this can just highlite
something<BR> or serve to explain the meaning<BR> of industry buzzwords'
and
<map name="map">
<area shape="circle" coords="572,145,17" href="map.htm" title=""
onMouseOver="showtip(this,event,'1')" onMouseOut="hidetip()">
<area shape="circle" coords="372,81,22" href="map.htm" title=""
onMouseOver="showtip(this,event,'0')" onMouseOut="hidetip()">
<area shape="default" nohref>
</map>
You are going to need to know 2 pieces of info about each area.
shape
tip
You can pull these out of a db, make a cold fusion array, or grab it out of a text
file, but you will need this data for each area.
So, in Cold Fusion
First thing, get the data. Lets pretend you have gotten the data into a CF Query named
"areas".
<cfquery ...>
<HTML>
[top of document goes here]
var tip=new Array
<cfoutput query="areas">
tip[#currentRow-1#]='#tip#'
</cfoutput>
[Rest of HTM goes here]
<map name="map">
<cfoutput query="areas">
<area shape="circle" coords="#shape#" href="map.htm" title=""
onMouseOver="showtip(this,event,'#currentRow-1#')" onMouseOut="hidetip()">
</cfoutput>
<area shape="default" nohref>
</map>
</body>
</html>
(NOTE: UNtested, so CF code might be wrong)
Does this give you the idea?
Jerry Johnson
>>> [EMAIL PROTECTED] 08/27/03 07:11AM >>>
Hi everyone --
The flash is beautiful -- but I'm not that great with flash, so let's stick with the
imagemaps and javascript.
The reason why is this has to be portable, I'm considering doing a map of
Massachusetts for someone with tooltip mouseovers, and most of the clients probably
don't have flash and probably don't want to download it.
So, again -- just give me a how a coldfusion database parsing statement could work
with a statement like this...or you can view source again at
http://www.juliagreen.com/map.htm
Sorry to bother you guys, but sadly, I'm a beginner at imagemaps (pretty good at forms
though)...
<map name="map">
<area shape="circle" coords="572,145,17" href="map.htm" title=""
onMouseOver="showtip(this,event,'1')" onMouseOut="hidetip()">
<area shape="circle" coords="372,81,22" href="map.htm" title=""
onMouseOver="showtip(this,event,'0')" onMouseOut="hidetip()"><area shape="default"
nohref>
</map>
> ***************************************
> Julia Computer Consulting
> Web Design @ Reasonable Prices
> Email: [EMAIL PROTECTED]
> www.juliagreen.com
> Phone: 617-926-3413
> Cell: 617-596-6003
> Fax: 1-309-437-7979
Michael Dinowitz <[EMAIL PROTECTED]> wrote:
Wow, this takes me back. One of my first hacks was making CF work with server
side imagemaps. Best idea is to make them into client side image maps.
Otherwise, you'll have to take the x&y coordinates that come from the image map
and make CF parse them. Let me dig for some code. It'll be years old though.
OK, I found it and uploaded it here:
http://www.houseoffusion.com/_library/
Please remember that the code is years and years old (1996).
> I saw a map of America at Brandeis about two years ago where a student could
mouseover the map, and information for each area of the country came from a
database all written in ColdFusion.
>
> I figured out how to do it in javascript and dhtml, but how do you get the
tooltips to come from the table or whatever, use a cfoutput tag...but how do you
get the message in a javascript tooltip...You don't have to go into the sql or
anything -- just how do you get the mouseover tooltips to work...
>
> See http://www.juliagreen.com/map.htm
>
> Put your cursor over Minnesota and Pennsylvania -- if I was trying to get a
percentage or something from a table how would I do it? You are free to look at
the sourcecode. I have done searches for Coldfusion tootips, coldfusion
imagemaps all to no avail...
>
>
>
>
>
>
>
>
> ***************************************
> Julia Computer Consulting
> Web Design @ Reasonable Prices
> Email: [EMAIL PROTECTED]
> www.juliagreen.com
> Phone: 617-926-3413
> Cell: 617-596-6003
> Fax: 1-309-437-7979
>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Signup for the Fusion Authority news alert and keep up with the latest news in
ColdFusion and related topics.
http://www.fusionauthority.com/signup.cfm