.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Articles >> ASP.NET >> Post New Resource Bookmark and Share   

 Subscribe to Articles

Detecting Mouse Events : JavaScript

Posted By:Gaurav Arora       Posted Date: April 26, 2009    Points: 10    Category: ASP.NET    URL: http://www.dotnetspark.com  
 

Sometime there is a need to disable MouseEvents for specific task(s) in Web-Pages.


The following code-snippet shows how to achieve the same : 





Capturing Mouse Events Using JavaScript






Testing wuth Submit Button :
onclick="return preventOperation(event)" ondblclick="return preventOperation(event)"
oncontextmenu="return preventOperation(event)">




Testing with Input Text :
onclick="return preventOperation(event)" ondblclick="return preventOperation(event)"
oncontextmenu="return preventOperation(event)">





Copy paste above code in a text document and named it as MouseEvents.html
Now test the same.



 Subscribe to Articles

     

Further Readings:

Responses

No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More Articles on C#, ASP.Net, Vb.Net, SQL Server and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend