>
Blog
Book
Portfolio
Search

3/27/2008

4044 Views // 0 Comments // Not Rated

Table Mouseover Fires When Cells And Rows Are MousedOver (More IE6 Fun)

Today must be national "IE 6 Is A Piece Of Dog Crap" day...

I'm using some JavaScript in a script control to hook mouseover on a table element using $addHandler and a callback (so I can pass a parameter to my event handler), like so:

Code Listing 1

  1. $addHandler(tableInstance, 'mouseover', Function.createCallback(this.OnTableMouseOver, this));

It looks like this is hooking mouseover for all of the rows and cells in the table in addition to the table itself. Grr. To make this work the way you would intuitively think it should, (in IE 6 of course) add a check for the target's tag name to make sure that you are only dealing with the element you want to be.

Code Listing 2

  1. OnTableMouseOver : function (e, sender)
  2. {
  3. if (e.target.tagName == 'TABLE')
  4. {
  5. ...
  6. }
  7. }

Thought I'd share. If I post another blog about IE 6 today, I'll probably be too hung over tomorrow to post anything.

No Tags

No Files

No Thoughts

Your Thoughts?

You need to login with Twitter to share a Thought on this post.


Loading...