[advanced search]
 

Go Back   NamePros.com > Discussion > Web Design & Development > Programming

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.


Closed Thread
 
LinkBack Thread Tools
Old 08-05-2008, 06:28 PM   #1 (permalink)
Senior Member
 
Join Date: Mar 2005
Location: canada
Posts: 1,020
591.76 NP$ (Donate)

skrilla is just really niceskrilla is just really niceskrilla is just really niceskrilla is just really nice


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
__________________
RB's Lingerie
COME VISIT NOW!!! Sign up for adsense at www.ratemymug.com
This line is for sale PM for details
skrilla is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Site Sponsors
Advertise your business at NamePros

All times are GMT -7. The time now is 06:05 AM.


Powered by: vBulletin® Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0
Template-Modifications by TMS
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85