OnMouseOver Not Working?
+4
Sir Chivas™
DustyBones
Sir. Mayo
ANGrey
8 posters
Page 1 of 1
OnMouseOver Not Working?
Hi everyone.
I don't have a forum of my own, but I can contact the head admin of the forum in question if need be.
HTML is enabled (and in fact, encouraged) on the forum, but the onmouseover function isn't working at all. My code is as follows:
I don't have a forum of my own, but I can contact the head admin of the forum in question if need be.
HTML is enabled (and in fact, encouraged) on the forum, but the onmouseover function isn't working at all. My code is as follows:
- Code:
<a href="http://www.google.com/"><img src="http://g-ec2.images-amazon.com/images/G/01/th/aplus/hunterfan/B003IPCYN0-White-Blade.jpg" onmouseover="this.src:'http://blogs.discovermagazine.com/badastronomy/files/2010/11/black.jpg'" onmouseout="this.src:'http://g-ec2.images-amazon.com/images/G/01/th/aplus/hunterfan/B003IPCYN0-White-Blade.jpg'"/></a>
Re: OnMouseOver Not Working?
I have no idea What your trying to do with Three links there but i dont think you can have it display two different things on each mouse over. But i could be wrong.
Last edited by Sir. Mayo on April 19th 2013, 12:21 am; edited 1 time in total
Re: OnMouseOver Not Working?
You have on mouse twice idk why but i got this so far
Use <span Title = ""> </span> Rather then onmouseover.
I think onmouseover is used in java. As well as Onmouseout
- Code:
<a href="http://www.google.com/"><img src="http://g-ec2.images-amazon.com/images/G/01/th/aplus/hunterfan/B003IPCYN0-White-Blade.jpg" <span Title="http://g-ec2.images-amazon.com/images/G/01/th/aplus/hunterfan/B003IPCYN0-White-Blade.jpg"</span>
Use <span Title = ""> </span> Rather then onmouseover.
I think onmouseover is used in java. As well as Onmouseout
Last edited by Sir. Mayo on April 19th 2013, 12:17 am; edited 1 time in total (Reason for editing : Code was wrong Fixed now.)
Re: OnMouseOver Not Working?
That code has nothing to do with what I'm trying.
I'll explain the code.
This is a link to Google; I've never seen the code work without it linking to something.
This is the original image link, and what it appears as normally.
This sets it so that when the mouse is hovering over the image, the source of the image changes to this link.
This sets it so that when the onmouseover works, it sets it BACK to the original image when the mouse is moved off of the image.
I'll explain the code.
<a href="http://www.google.com/"><img src="http://g-ec2.images-amazon.com/images/G/01/th/aplus/hunterfan/B003IPCYN0-White-Blade.jpg" onmouseover="this.src:'http://blogs.discovermagazine.com/badastronomy/files/2010/11/black.jpg'" onmouseout="this.src:'http://g-ec2.images-amazon.com/images/G/01/th/aplus/hunterfan/B003IPCYN0-White-Blade.jpg'"/></a>
This is a link to Google; I've never seen the code work without it linking to something.
This is the original image link, and what it appears as normally.
This sets it so that when the mouse is hovering over the image, the source of the image changes to this link.
This sets it so that when the onmouseover works, it sets it BACK to the original image when the mouse is moved off of the image.
Re: OnMouseOver Not Working?
after the 2 image links, instead of '"
try using ';"
Also this code will not work in a post. The link to web site will work but not the mouse over. Why I don't know, I use that code in a widget and it works there fine.
try using ';"
Also this code will not work in a post. The link to web site will work but not the mouse over. Why I don't know, I use that code in a widget and it works there fine.
Re: OnMouseOver Not Working?
Hi,
Why don't you use CSS?
HTML:
CSS:
Why don't you use CSS?
HTML:
- Code:
<a class="myButtonLink" href="#LinkURL"><img src="img_URL.png" /></a>
CSS:
- Code:
.myButtonLink {
display: block;
width: 100px;
height: 100px;
background: url('myImage.png') bottom;
text-indent: -99999px;
}
.myButtonLink:hover {
background-position: 0 0;
}
Re: OnMouseOver Not Working?
Sir. Mayo wrote:I have no idea What your trying to do with Three links there but i dont think you can have it display two different things on each mouse over. But i could be wrong.
Sir. Mayo wrote:You have on mouse twice idk why but i got this so far
- Code:
<a href="http://www.google.com/"><img src="http://g-ec2.images-amazon.com/images/G/01/th/aplus/hunterfan/B003IPCYN0-White-Blade.jpg" <span Title="http://g-ec2.images-amazon.com/images/G/01/th/aplus/hunterfan/B003IPCYN0-White-Blade.jpg"</span>
Use <span Title = ""> </span> Rather then onmouseover.
I think onmouseover is used in java. As well as Onmouseout
Please don't double/triple post. Your post need to be separated by 24 hours before bumping, replying or adding more information. Please use the edit button instead! |
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Re: OnMouseOver Not Working?
Adam's not keen on adding things to the CSS. Is there a way to do it strictly with HTML?
Re: OnMouseOver Not Working?
He will just add it here:Calιbuяn wrote:Adam's not keen on adding things to the CSS. Is there a way to do it strictly with HTML?
Admin Panel > Display > Colors > CSS Stylesheet:
Add the code at the bottom
> Save
Jophy- ForumGuru
- Posts : 17924
Reputation : 836
Language : English
Location : Somewhere
Re: OnMouseOver Not Working?
Use this code:
- Code:
<a href="http://www.google.com/"><img border="0" src="http://g-ec2.images-amazon.com/images/G/01/th/aplus/hunterfan/B003IPCYN0-White-Blade.jpg" onmouseover="this.src='http://blogs.discovermagazine.com/badastronomy/files/2010/11/black.jpg';" onmouseout="this.src='http://g-ec2.images-amazon.com/images/G/01/th/aplus/hunterfan/B003IPCYN0-White-Blade.jpg';"></a>
Re: OnMouseOver Not Working?
We know HOW to do it. Adam doesn't want to add anything to the CSS. That's not an option.Jophy wrote:He will just add it here:Calιbuяn wrote:Adam's not keen on adding things to the CSS. Is there a way to do it strictly with HTML?
Admin Panel > Display > Colors > CSS Stylesheet:
Add the code at the bottom
> Save
Did not work D:Matti_7 wrote:Use this code:
- Code:
<a href="http://www.google.com/"><img border="0" src="http://g-ec2.images-amazon.com/images/G/01/th/aplus/hunterfan/B003IPCYN0-White-Blade.jpg" onmouseover="this.src='http://blogs.discovermagazine.com/badastronomy/files/2010/11/black.jpg';" onmouseout="this.src='http://g-ec2.images-amazon.com/images/G/01/th/aplus/hunterfan/B003IPCYN0-White-Blade.jpg';"></a>
Re: OnMouseOver Not Working?
So pure HTML?
- Code:
<a class="myButtonLink" href="#LinkURL"><img src="img_URL.png" /></a>
<style type="text/css">
.myButtonLink {
display: block;
width: 100px;
height: 100px;
background: url('myImage.png') bottom;
text-indent: -99999px;
}
.myButtonLink:hover {
background-position: 0 0;
}</style>
Re: OnMouseOver Not Working?
You can do a mouseover image link with javascript, that would be like this:
You have 2 images, one is the mouseover image and the other is the static image.
Add this near the top of the page in the body tags so it loads first, this is the mouseover image that will be preloaded so when you hover over the image is will show fast because its already loaded:
Place this code where you want the image link to show:
You have 2 images, one is the mouseover image and the other is the static image.
Add this near the top of the page in the body tags so it loads first, this is the mouseover image that will be preloaded so when you hover over the image is will show fast because its already loaded:
- Code:
<SCRIPT LANGUAGE="JavaScript">
image1 = new Image();
image1.src = "URL OF MOUSEOVER IMAGE GOES HERE";
</script>
Place this code where you want the image link to show:
- Code:
<a href="LINK DESTINATION URL" onmouseover="image1.src='MOUSEOVER IMAGE URL';"
onmouseout="image1.src='STATIC IMAGE URL';">
<img name="image1" src="STATIC IMAGE URL" title="TITLE HERE" border=0></a>
Similar topics
» looking for onMouseover code
» Portal "news" module: Can it display the latest po
» how to add url with the code onmouseover bbcode ?
» problem with onMouseover text script
» admin control panel not working correctly, moderation buttons not working, when posting message saying link to insecure url
» Portal "news" module: Can it display the latest po
» how to add url with the code onmouseover bbcode ?
» problem with onMouseover text script
» admin control panel not working correctly, moderation buttons not working, when posting message saying link to insecure url
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum