View Full Version : picture changes when cursor goes over it
When the cursor moves to a picture (which is linked to a webpage), it changes to another picture.
Also could someone advise on how to ensure that the link address is not shown in window status (bottom left hand corner of the webpage) when browsing using Internet explorer 7?
Many thanks in advance.
This is exactly what you need!:
http://www.dynamicdrive.com/dynamicindex4/thumbnail2.htm
Thanks to Nile.
But what I need is not thumbnail.
It's just the picture of same size on the same spot changes when the cursor moves over it.
It doesn't matter, this script will defendantly work.
Thanks Nile, I get what you mean.
Do you know how to ensure that the link address is not shown in window status (bottom left hand corner of the webpage) when browsing using Internet explorer 7?
djr33
08-21-2008, 04:15 AM
Can you link to your page so we can see what you mean?
I am still in the midst of building the site.
Take for instance the following site:
http://www.computerhope.com/onmouse.htm
When the cursor moves over the link, the URL is shown at the left hand bottom of the page (using IE7) . I wonder if there is anyway to hide it?
Heres a fake link:
<script type="text/javascript">
function goTo(url){
window.location.href = url;
}
</script>
<style type="text/css">
.link {
color: blue;
cursor: pointer;
text-decoration: underline;
border-style: dotted;
border-color: darkred;
border-width: 0px;
}
</style>
<span class="link" onmousedown="this.style.color='darkred';this.style.borderWidth='1px';" onmouseup = "this.style.color='blue';this.style.borderWidth='0px'"onclick="goTo('http://google.com');">Fake Link</span>
djr33
08-21-2008, 04:46 AM
<a href="....." onmouseover="imagestuff">
You just need to remove href, or make it link to "#", which is standard for not reloading the page (it will display, but that's normal). I believe it's more proper to have "#" than no href, as that will keep the page standard.
Many thanks to Nile and Djr33 for both your kind response to my queries on how to hide the URL link
If the cursor moves over a picture (with and without picture changes) instead of a word, how should the code be changed? I could not figure out how to do that.
Here you go:
<script type="text/javascript">
function goTo(url){
window.location.href = url;
}
</script>
<style type="text/css">
.link {
color: blue;
cursor: pointer;
text-decoration: underline;
border-style: dotted;
border-color: darkred;
border-width: 0px;
}
</style>
<span class="link" onclick="goTo('http://google.com');" onmousedown="this.style.borderWidth='1px';" onmouseup="this.style.borderWidth='0px';" onmouseout="this.onmouseup()"><img src="http://www.dynamicdrive.com/forums/designfiles/logo.gif"></span>
Many thanks to Nile for your kind response.
Would appreciate if you could advise on how to modify the code that you furnished earlier so that a new window would be opened when I click on the image?
The code I used earlier was
<A HREF="http://google.com" target=_blank><img src="1.jpg" ></A>
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.