/    Sign up×
Community /Pin to ProfileBookmark

mutiple boxes highlighted for a single mouseover

Hi,
I am trying to highlight multiple boxes(or areas) in the map of the world when the user mouses over a given weather model. For example, when the user mouses over a tab called “global Forecast system(GFS)”, the various regions of the world that are covered by this model should be highlighted on the map of the world. i.e NAmerica, SAmerica, Africa etc.
Here is the piece of code that i’m using.

<script language=”Javascript” type=”text/javascript”>
function show_tab(nam)
{
document.getElementById(“TABncoworld”).style.display= “none”;
document.getElementById(“TABnamerica”).style.display= “none”;
document.getElementById(“TABsamerica”).style.display= “none”;
document.getElementById(“TABafrica”).style.display= “none”;
document.getElementById(“TABcanada”).style.display= “none”;
document.getElementById(“TABnpacific”).style.display= “none”;
document.getElementById(“TABepacific”).style.display= “none”;
document.getElementById(“TABnwatlantic”).style.display= “none”;
document.getElementById(“TABpolaricedrift”).style.display= “none”;
document.getElementById(“TABatlanticpacific”).style.display= “none”;
document.getElementById(nam).style.display = “block”;
}
</script>

<td width=”107″ class=”nav” id=”menuitem”><div align=”center” style=”font-size: xx-small; font-weight: bold”><a href=”http://www.spc.noaa.gov/products/outlook/” class=”style3″ onMouseOver=”show_tab(‘TABnamerica’)”>NAM</a></div></td>
<td width=”107″ class=”nav” id=”menuitem”><div align=”center” style=”font-size: xx-small; font-weight: bold”><a href=”http://www.spc.noaa.gov/products/outlook/” class=”style3″ onMouseOver=”show_tab(‘TABnamerica’);show_tab(‘TABsamerica’);show_tab(‘TABafrica’)” alt=”Current Day 1 Outlook”>GFS</a></div></td>

When I mouse over ‘GFS’, both TABnamerica and TABsamerica should get selected. But only TABsamerica shows. I want all the boxes to be highlighted. how do i fix this?

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @bhavanar spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...