not working

Each row in my table consists of a number of columns. The first column contains a checkbox. I want to display details for the row if any column of the row has been clicked, except the first one. This code works fine in IE, but when I run it in Mozilla, I get "targ has no properties" error. It looks like window.event is not recognized because none of the alerts are displayed. Is it my browser settings?

<tbody onClick='doSelect(this);'>

    var targ;
    if (!e) {
      var e = window.event;
    if ( {
      targ =;
    else if (e.srcElement) targ = e.srcElement;
    if (targ.nodeType == 3) // defeat Safari bug
        targ = targ.parentNode;

    if ( targ.tagName == "INPUT" && targ.type == "checkbox" ) {
Who is Participating?
cLFlaVAConnect With a Mentor Commented:

How are you calling the function?

Here is an example of how to use events and targets/srcElements:

function doIt(e) {
    var targ = ? : e.srcElement;

      <tbody onclick="doIt(event);">
            <tr><td>Row 1 Cell 1</td></tr>
      <tbody onclick="doIt(event);">
            <tr><td>Row 2 Cell 1</td></tr>
EwSAuthor Commented:
That was it! I was using 'this' instead of 'event' when calling the function. Thank you - I'm very grateful!
All Courses

From novice to tech pro — start learning today.