Forum Moderators: open
I have a map of Europe on a page (say, "europe1.gif"). I want to polygon image-map certain countries (say France) so that when the user clicks on France europe1.gif gets swapped for france1.gif.
Then a new link appears "<-- back" somewhere which allows the user to get back to the europe1.gif image.
Basically a zoomable image, without using Flash or similar.
Hope that makes sense.
The image-map obviously is easy, it's the JS part that I'm not sure about.
Possible?
Thanks,
TJ
If I understand you then this does what you want.
<HTML><HEAD>
<script type="text/javascript">
function swap(whichContent) {
document.getElementById('content').innerHTML = document.getElementById(whichContent).innerHTML;
}
</script>
</HEAD>
<BODY onload="swap('europe')">
<div id=content>
</div>
<div style="visibility:hidden">
<div id=europe>
<MAP NAME=map1>
<AREA SHAPE=rect COORDS="203,144,296,295" HREF="#" onclick="swap('france')"; return false">
</MAP>
<IMG USEMAP="#map1" SRC="europe.jpg"></P>
</div>
<div id=france>
<img src="france.jpg"><a href="#" onclick="swap('europe'); return false"><P>Back to Europe...</a>
</div>
</div>
</BODY>
</HTML>