|
-
May 7th, 2002, 05:06 PM
#10
Frenzied Member
Originally posted by cpradio
If you would just test my way you will see how I do the mouseover and mouseout works!!
Yes, the mouseover and mouseout work. So does the mouseclick. And you have nothing to disable the mouseout so it will work again.
Secondly to quit it from changing back to red just do this following:
Code:
<script language="JavaScript">
var out = false;
function imageChanger (image) {
if (image == 'red.gif' && !out)
document.imageName.src = image;
else if (image == 'red.gif' && out)
;
else
document.imageName.src = image;
}
</script>
This will only allow you to mouseout untill the image is clicked.
There you go. You finally fxed the problem. I didn't say it couldn't be done, I was just pointing out that the way you did it wouldn't have the desired affect. Since you finally got it in three tries. I won't hold it against you.
But I will hold this against you. The highlighted parts of your code should be changed. The parts in blue are depricated. The parts in red are, in so far as anyone has been able to show me, completely wrong. In other words, "imageName" is not a recognized property or method of the object "document".
Travis, Kung Foo Journeyman
As always, RTFM.
WWW Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.3 Guide and Reference
Perl: Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
YBMS, but Mozilla doesn't.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|