• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

on mousedown event

 
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello, i'm currently having a problem in putting a "onmousedown" attribute to my table rows... this is my code:

var x = document.getElementById('table_1').insertRow (document.getElementById('table_1').rows.length);
if(window.Event) x.onmousedown = function(event) { return checkRow (this, event); }
else x.onmousedown = function(event) { return checkRow (this, event); }

it doesn't work! my function is not being called how do i fix this? thanks!!!

NOTE: currently, all of the above are enclosed in a string because i insert it in a browser.execute (<javascript string of code> function to run it. do you think that has an effect? thanks!!!
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why are you not using onclick?

Eric
 
christine clarin
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
we're not using onclick because the mouse button clicked isn't recognized when i use onclick. i.e., it doesn't know event.button. how do i fixthis? thanks!
 
They worship nothing. They say it's because nothing is worth fighting for. Like this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic