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!

Identifying OnMouseDown Left Click versus Right Click

Status
Not open for further replies.

ChrisQuick

Programmer
Oct 4, 1999
144
US
I've got a html table that gets written out to a preliminary results page based on a database search done with ASP.

The HTML table only visually displays three columns, but the SQL statement pulls down a total of ten columns. The full amount of data is written into a populateSearch Function. The function takes the information and throws the data to a from in a different frame. I am triggering the function using the OnMouseDown event on the table row or <TR> like this:

<tr bgcolor=&quot;silver&quot; onmouseover=&quot;this.style.background='yellow'&quot; onmouseout=&quot;this.style.background='silver'&quot; onMouseDown=&quot;populateSearch('a','b','c','d'etc..');&quot;>


The problem is, this works with both the left and right mouse bottons. I only want to use the left button to trigger the function, and ignore right clicks but WITHOUT disabling right clicks altogether or altering the default behavior for it.

Any ideas?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top