Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disabling MouseOver after MouseClick?

Status
Not open for further replies.

tranzparentl

Technical User
Jan 7, 2005
3
US
I have a web training that i'm making that uses javascripts with OnMouseOver and OnMouseDown. Both of those are used to swap images on the page. I was wondering if there is a way to disable the OnMouseOver after the OnMouseDown is activated.

If that doesn't make sence you can see the page I'm talking about.

 
Ok, i am new to scripting but i came up with this script,

It works for me .. but i may be grasping the wrong thing here.

Try it anyway

Code:
<html>
<head>
<title> Practice </title>
</head>

<body>

<img src="[URL unfurl="true"]http://www.tek-tips.com/images/partnerbtn120x60.gif"[/URL] id="img_yay" onmouseover="document.getElementById('img_yay').src='[URL unfurl="true"]http://www.tek-tips.com/images/logo.gif'"[/URL] onmouseout="document.getElementById('img_yay').src='[URL unfurl="true"]http://www.tek-tips.com/images/partnerbtn120x60.gif'"[/URL] onmousedown="alert('stops onmouseover'); document.getElementById('img_yay').onmouseover=''">

</body>
</html>

JavaScript Beginner at work :)
 
Thats exactly what i was looking for. thanks for the help!
mike
 
No problem, anytime

p.s - what made you make such website?

JavaScript Beginner at work :)
 
Its something I'm doing for work so the people I work with won't have any excuses when they mess up.
 
No, i mean the "hating cops" part.

JavaScript Beginner at work :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top