What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » using html to 'mouseover' images

Pages: (3): « First [ 1 ] 2 3 » Last »
using html to 'mouseover' images
Author: Message:
stoshrocket
Senior Member
****

Avatar
formerly methos

Posts: 748
Reputation: 31
34 / Male / Flag
Joined: Aug 2005
O.P. using html to 'mouseover' images
is there any html code i could use to do a 'mouseover' on an image thats going to be a link? i have only heard of js that does this and dont want to learn that just yet, anyone know of any quick fixes???
formerly methos
11-17-2005 09:27 PM
Profile PM Web Find Quote Report
Dempsey
Scripting Contest Winner
*****

Avatar
http://AdamDempsey.net

Posts: 2395
Reputation: 53
38 / Male / Flag
Joined: Jul 2003
RE: using html to 'mouseover' images

It's not possible using HTML alone, you have to also use JavaScript or CSS.  Here is an example using JavaScript that I use on MPSounds.net:

code:
<img name="search" src="images/search.gif" alt="Search SoundPacks" onmouseover="document.search.src='images/search2.gif'" onmouseout="document.search.src='images/search.gif'" border="0"></a>
SoundPacks   -   Scripts   -   Skins

that's not a bug, thats an unexpected feature
11-17-2005 09:31 PM
Profile E-Mail PM Web Find Quote Report
stoshrocket
Senior Member
****

Avatar
formerly methos

Posts: 748
Reputation: 31
34 / Male / Flag
Joined: Aug 2005
O.P. RE: using html to 'mouseover' images
hmm.... is that all i need instead of the html or do i need some stuff in the head as well??
formerly methos
11-17-2005 09:34 PM
Profile PM Web Find Quote Report
Dempsey
Scripting Contest Winner
*****

Avatar
http://AdamDempsey.net

Posts: 2395
Reputation: 53
38 / Male / Flag
Joined: Jul 2003
RE: using html to 'mouseover' images
thats it, although you could have some javascript in the head tag to preload the rollover images.
SoundPacks   -   Scripts   -   Skins

that's not a bug, thats an unexpected feature
11-17-2005 09:37 PM
Profile E-Mail PM Web Find Quote Report
stoshrocket
Senior Member
****

Avatar
formerly methos

Posts: 748
Reputation: 31
34 / Male / Flag
Joined: Aug 2005
O.P. RE: using html to 'mouseover' images
ok, but what do i do about the areas in bold...
code:
<img name="search" src="images/search.gif" alt="Search SoundPacks" onmouseover="document.search.src='images/search2.gif'" onmouseout="document.search.src='images/search.gif'" border="0"></a>


what do i do about those? do they apply to anything??
formerly methos
11-17-2005 09:39 PM
Profile PM Web Find Quote Report
hmaster
Senior Member
****

Avatar

Posts: 716
Reputation: 24
33 / Male / Flag
Joined: Nov 2004
RE: using html to 'mouseover' images
Yeh to preload it do something like:
code:
<head>
<script language="JavaScript">
<!--
image1 = new Image();
image1.src = "images/image1.png";

image2 = new Image();
image2.src = "images/image2.png";
//-->
</script>
<style>
</head>


and the html

code:
<a href="page1.html" onmouseover="image1.src='images/image1.png;"
onmouseout="image1.src='images/image1.png;">
<img name="image1" src="images/image1.png" border=0></a>

<a href="page2.html" onmouseover="image2.src='images/image2.png';"
onmouseout="image2.src='images/image2.png;">
<img name="image2" src="images/image1.png" border=0></a>

This post was edited on 11-17-2005 at 09:42 PM by hmaster.
[Image: sig.png]
11-17-2005 09:41 PM
Profile PM Web Find Quote Report
stoshrocket
Senior Member
****

Avatar
formerly methos

Posts: 748
Reputation: 31
34 / Male / Flag
Joined: Aug 2005
O.P. RE: using html to 'mouseover' images
aaaahhhh... cheers you two!! (b) :bow:
formerly methos
11-17-2005 09:42 PM
Profile PM Web Find Quote Report
saralk
Veteran Member
*****

Avatar

Posts: 2598
Reputation: 38
35 / Male / Flag
Joined: Feb 2003
RE: using html to 'mouseover' images
well if you are going to have multiple images that rolling over, then you need to change it accordingly, so where is says "search" it would say something else
The Artist Formerly Known As saralk
London · New York · Paris
Est. 1989
11-17-2005 09:42 PM
Profile PM Find Quote Report
hmaster
Senior Member
****

Avatar

Posts: 716
Reputation: 24
33 / Male / Flag
Joined: Nov 2004
RE: using html to 'mouseover' images
but you dont need the name="whatever"
[Image: sig.png]
11-17-2005 09:43 PM
Profile PM Web Find Quote Report
stoshrocket
Senior Member
****

Avatar
formerly methos

Posts: 748
Reputation: 31
34 / Male / Flag
Joined: Aug 2005
O.P. RE: using html to 'mouseover' images
hmm.... i've juts been doing this and i cant seem to get it to work, heres the code i have in so far:

-under the head tag
code:
<script language="JavaScript">
<!--

image1 = new Image();
image1.src = "images/graphics-over.png";

//-->
</script>


-and under the body tag
code:

<a href="graphics.html" onmouseover="image1.src='images/graphics-over.png';"
onmouseout="image1.src='images/graphics.png;">
<img src="images/graphics.png" border=0></a>



anyone see why its not working? thanks!

edit

sorted, seems i did need the 'name whatever' hehe, thanks anyway!

This post was edited on 11-17-2005 at 10:17 PM by stoshrocket.
formerly methos
11-17-2005 10:16 PM
Profile PM Web Find Quote Report
Pages: (3): « First [ 1 ] 2 3 » Last »
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On