highlighting text within a specific cell

M

mikename

Hi,
I'm currently working on a project which is essentially a clickable
world map. I have successfully mapped the image and using a
OnMouseOver = "Continent()" OnMouseOut = "World()" command in each
mapping line ie. <area shape="poly" onmouseover="NA()"
onmouseout="World()" coords="(lotsonumbers)".

In my continent functions I change the image using something like:
function Africa()
{document.images[35].src="/_View/images/maps/worldmaps/world.africa.jpg";
return true;}

This gives me the "highlighting" effect I was looking for when people
mouse over the continent.

However! my problem now is that I need to find a way to essentially
link that with a cell within the same table as the mapped image. There
is a list of the continents in the column next to the map (the map has
all the rows merged in that column). I need it so that if I run the
mouse over the continent or that cell both of them highlight at the
same time. I see the best way of doing this as having both call the
World or Continent function. However I have been unable to find any
way of setting a specific cell's background or text from within a
function.

If you have any suggestions or can help with the syntax I'd appreciate
it very much.

Thanks for your time,
Mike
 
J

Joshie Surber

Hi,
I'm currently working on a project which is essentially a clickable
world map. I have successfully mapped the image and using a
OnMouseOver = "Continent()" OnMouseOut = "World()" command in each
mapping line ie. <area shape="poly" onmouseover="NA()"
onmouseout="World()" coords="(lotsonumbers)".

In my continent functions I change the image using something like:
function Africa()
{document.images[35].src="/_View/images/maps/worldmaps/world.africa.jpg";
return true;}

This gives me the "highlighting" effect I was looking for when people
mouse over the continent.

This is what happens when you put a text editor in front of a bored
programmer.
However! my problem now is that I need to find a way to essentially
link that with a cell within the same table as the mapped image. There
is a list of the continents in the column next to the map (the map has
all the rows merged in that column). I need it so that if I run the
mouse over the continent or that cell both of them highlight at the
same time. I see the best way of doing this as having both call the
World or Continent function. However I have been unable to find any
way of setting a specific cell's background or text from within a
function.

Better way... make your globe using something like
http://www.alistapart.com/articles/sprites/ and have the image inside
your anchor list. ie:
<ol id="map">
<li><a href="NA" onmouseover="NA()" onmouseout="World()">North America
<img src="na.gif" style="position:absolute;top:100px;left:150px"
/></li>
<li>...

then your hilight code can stay in your anchors. In fact, you could do
your hilighting with CSS this way. Much tidier.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top