By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,286 Members | 2,443 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,286 IT Pros & Developers. It's quick & easy.

highlighting text within a specific cell

P: n/a
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

Sep 7 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a

mi******@gmail.com wrote:
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.
If you have any suggestions or can help with the syntax I'd appreciate
it very much.

Thanks for your time,
Mike
Sep 7 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.