Go Back   CodingForums.com > :: Client side development > JavaScript programming > DOM and JSON scripting

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Old 11-07-2009, 12:02 AM   PM User | #1
calebandchels
New to the CF scene

 
Join Date: Nov 2009
Location: Florida United States
Posts: 9
Thanks: 1
Thanked 0 Times in 0 Posts
calebandchels is an unknown quantity at this point
Image Swapping Im new to coding could use some advice

So this code won't swap the images im using when i pull it up in IE but it will work in firefox any way to fix this...I am new to coding so if you can explain why it doesnt work I would really appreciate it!

Caleb

Code:
		
		<div id="leftnav">
			<ul>
				<li><a href="home.html"><img src="home1.gif"
				                             onMouseOver="document.homeb.src='home2.gif';" 
											 onMouseOut="document.homeb.src='home1.gif';" 
				                             id="homeb"
				                             alt="home1"											 ></a></li>
				<li><a href="striping.html"><img src="striping.gif"
				                              alt="striping"
											  id="striping"
											   onMouseOver="document.striping.src='striping2.gif';" 
											   onMouseOut="document.striping.src='striping.gif';" ></a></li>
				<li><a href="design.html"><img src="design.gif"
				                             alt="design"
											 id="design"
											 onMouseOver="document.design.src='design2.gif';" 
											 onMouseOut="document.design.src='design.gif';" ></a></li>
				<li><a href="lettering.html"><img src="lettering.gif"
				                                alt="lettering"
												id="lettering"
											    onMouseOver="document.lettering.src='lettering2.gif';" 
											    onMouseOut="document.lettering.src='lettering.gif';" ></a></li>				
				<li><a href="contact.html"><img src="contact.gif"
				                                alt="contact"
												id="contact"
												onMouseOver="document.contact.src='contact2.gif';" 
											    onMouseOut="document.contact.src='contact.gif';" ></a></li>				
			</ul>
		</div>

Last edited by calebandchels; 11-07-2009 at 12:13 AM..
calebandchels is offline   Reply With Quote
Old 11-07-2009, 10:19 AM   PM User | #2
rougeress
New to the CF scene

 
Join Date: Sep 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
rougeress is an unknown quantity at this point
Code:
onMouseOver="document.getElementById('homeb').src='home2.gif';" 										 onMouseOut="document.getElementById('homeb').src='home1.gif';"
homeb. gets the name (name="homeb")
rougeress is offline   Reply With Quote
Old 11-07-2009, 03:15 PM   PM User | #3
calebandchels
New to the CF scene

 
Join Date: Nov 2009
Location: Florida United States
Posts: 9
Thanks: 1
Thanked 0 Times in 0 Posts
calebandchels is an unknown quantity at this point
I got it figured out thank you.
calebandchels is offline   Reply With Quote
Old 11-07-2009, 04:01 PM   PM User | #4
ok91001
New to the CF scene

 
Join Date: Nov 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
ok91001 is an unknown quantity at this point
ok91001 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

Forum Jump


All times are GMT +1. The time now is 04:18 AM.

Home - Contact Us - Archives - Link to CF - Resources - Top 

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.