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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I create an 'onMouseOver' that happens only once? 1

Status
Not open for further replies.

angela

Programmer
May 5, 2000
3
US
I want to create an image that when the mouseOver takes place, and alert comes up, but only that once.  How can I do that?
 
have this in the script:<br><i>var didIt=false;</i><br>and send the mouseover to this function:<br><br><i>function doMouseOvr(<br>if (!didIt){<br>alert('hehehehehe');<br>didIt=true;<br>}<br>}</i><br><br>with this, if, by some miracle, you want to do it again, <br><br><i>didIt=false;<br>doMouseOvr():</i><br><br>hope this helps. <p>theEclipse<br><a href=mailto:eclipse_web@hotmail.com>eclipse_web@hotmail.com</a><br><a href=robacarp.webjump.com>robacarp.webjump.com</a><br>**-Trying to build a documentation of a Javascript DOM, crossbrowser, of course. E-mail me if you know of any little known events and/or methods, etc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top