HTML Help Forum HTML Help
Please Search for the answer to your question before asking it! Thanks.
 

a question-I think it's related to javascript
Post a Reply to this Topic Ask a New Question
Click here to go to the original topic
       HTML Help Forum -> Javascript
View previous topic :: View next topic  
Author Message
jmanperson1331



Joined: 18 Oct 2005
Posts: 2

Posted: Tue Oct 18, 2005 2:55 pm     a question-I think it's related to javascript  

I want a image where your mouse goes over it and it changes. I do not want a gigantic mega-huge super-long complicated code!!! And I think it's a javascript code so yeah pls respond
Superpetauction



Joined: 07 Oct 2005
Posts: 47
Location: Logansport, Indiana

Posted: Tue Oct 18, 2005 3:59 pm     Re..  

place this in the head tag
Code:  <script language="JavaScript">
<!--

image_1aon = new Image(150, 50);
image_1aon.src = "picture1b.gif";

image_1aoff = new Image(150, 50);
image_1aoff.src = "picture1.gif";

function
img_act(imgName) {
imgon = eval(imgName + "on.src");
document [imgName].src = imgon;
}
function
img_inact(imgName) {
imgoff = eval(imgName + "off.src");
document [imgName].src = imgoff;
}
--></script>

and this in the body

Code: <a href="imagelink" onmouseover="img_act('image_1a')"
onmouseout="img_inact('image_1a')"><img
src="picture1b.gif" border="0"
width="150" height="75" name="image_1a"></a>
degsy



Joined: 23 Feb 2005
Posts: 2440
Location: North East, UK

Posted: Wed Oct 19, 2005 2:36 am      

Some alternatives
http://degs.co.uk/test/javascript/rollover/rollover1.htm
 
 
DARFUR
HOSTING / DESIGN
MAKE MONEY

       HTML Help Forum -> Javascript
Page 1 of 1


Powered by phpBB Search Engine Indexer
Powered by phpBB 2.0.19 © 2001, 2002 phpBB Group