NameSilo

[Resolved] Some help with image display code

Spaceship Spaceship
Watch

skrilla

VIP Member
Impact
11
Some help with image display code

Here is my code:

Code:
<div id="display1" style="display: none">
<div class="dropdown">
<img src="dropdown.jpg" name="ludwig13" border="0" usemap="#Map55">
  <map name="Map55">
    <area shape="rect" coords="10,3,90,18" href="index.php?section2=strategy" onMouseOver = "imgOFF('ludwig13');" onMouseOut = "imgON('ludwig13');">
    <area shape="rect" coords="10,21,90,37" href="index.php?section2=branding" onMouseOver = "imgOFF('ludwig14');" onMouseOut = "imgON('ludwig14');">
    <area shape="rect" coords="10,40,90,56" href="index.php?section2=advert">
    <area shape="rect" coords="11,59,90,73" href="index.php?section2=esolutions">
  </map>
</div>
</div>

I am trying to display a new image for each hotspot on my one image the first hotspot (ludwig13) works fine.. I cant seem to get the other 3 to swap the image tho.. i believe it has to do with
Code:
<img src="dropdown.jpg" name="ludwig13" border="0" usemap="#Map55">
The image only has 1 name...ludwig13..... can i assign several names to this image? please help..

I also have my script in place

Code:
<script language="JavaScript">
<!--
if (document.images) {             
	ludwigON = new Image();
	ludwigOFF = new Image();
    ludwigON.src = "tab4.jpg";  
    ludwigOFF.src = "tab4b.jpg"; 
	ludwig2ON = new Image();
	ludwig2OFF = new Image();
    ludwig2ON.src = "tab3.jpg";  
    ludwig2OFF.src = "tab3b.jpg"; 
	ludwig3ON = new Image();
	ludwig3OFF = new Image();
    ludwig3ON.src = "tab2.jpg";  
    ludwig3OFF.src = "tab2b.jpg"; 
	ludwig4ON = new Image();
	ludwig4OFF = new Image();
    ludwig4ON.src = "tab1.jpg";  
    ludwig4OFF.src = "tab1b.jpg"; 
	
	ludwig13ON = new Image();
	ludwig13OFF = new Image();
    ludwig13ON.src = "dropdown.jpg";  
    ludwig13OFF.src = "dropdown2.jpg"; 
	
	ludwig14ON = new Image();
	ludwig14OFF = new Image();
    ludwig14ON.src = "dropdown.jpg";  
    ludwig14OFF.src = "dropdown3.jpg"; 
}

function imgON(imagename) {
	if (document.images) {
		document[imagename].src = eval(imagename+"ON.src");       
	}
}

function imgOFF(imagename) {
	if (document.images) {
		document[imagename].src = eval(imagename+"OFF.src");        
	}
}
//-->
</script>

Ok never mind all.. I figured it out
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
Unstoppable DomainsUnstoppable Domains
Dynadot — .com Registration $8.99Dynadot — .com Registration $8.99
Appraise.net

We're social

Unstoppable Domains
Domain Recover
DomainEasy — Live Options
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back