Hello folks,
I have an image - a map - that I want to display a name when ppl mouseover a location. I have created a layer that is hidden off the page and onMouseOver it moves to the right position. So far so good.
The problem lies in that there are 66 locations. I could make 66 different layers but that seems a) prone to error and b) way too fat code.
I would prefer to have one layer and change the text depending on which location is pointed at.
So far I have:
<script language="JavaScript1.2">
function moveLayer(title){
Layer1.style.top='200'
Layer1.style.left='200'
}
function hideLayer(){
Layer1.style.top='-300'
Layer1.style.left='-300'
}
to do the work
and 66 lines that look something like:
<area shape="rect" coords="-13,489,8,504" href="#" onMouseover="moveLayer()" onMouseout="hideLayer()" >
I am picturing using movelayer('location1') etc but my Javascript knowledge is limited to not knowing how to change the text when the layer comes in as it has already been written when the page is created in the browser.
I know more about ASP, but then get stuck in calling the mouseover event in JS but triggering something in ASP. Help??
Thanks
Steve Davis
hey.you@hahaha.com.au
I have an image - a map - that I want to display a name when ppl mouseover a location. I have created a layer that is hidden off the page and onMouseOver it moves to the right position. So far so good.
The problem lies in that there are 66 locations. I could make 66 different layers but that seems a) prone to error and b) way too fat code.
I would prefer to have one layer and change the text depending on which location is pointed at.
So far I have:
<script language="JavaScript1.2">
function moveLayer(title){
Layer1.style.top='200'
Layer1.style.left='200'
}
function hideLayer(){
Layer1.style.top='-300'
Layer1.style.left='-300'
}
to do the work
and 66 lines that look something like:
<area shape="rect" coords="-13,489,8,504" href="#" onMouseover="moveLayer()" onMouseout="hideLayer()" >
I am picturing using movelayer('location1') etc but my Javascript knowledge is limited to not knowing how to change the text when the layer comes in as it has already been written when the page is created in the browser.
I know more about ASP, but then get stuck in calling the mouseover event in JS but triggering something in ASP. Help??
Thanks
Steve Davis
hey.you@hahaha.com.au