Become a fan of Slashdot on Facebook


Forgot your password?
Check out the new SourceForge HTML5 internet speed test! No Flash necessary and runs on all devices. ×

Comment Re:My Kingdom for a Datagrid Element! (Score 1) 541

When's the last time you laid out a site without a table element on every page?

Thursday. I was off sick yesterday.

"Oh, I want this box to highlight red when this happens!" a user might say.

Custom Events are your friend, and a sound basis for designing any complicated user-interface or series of interactions: So your problem above boils down to:

YAHOO.util.Event.on(thisBox, thisHappened, updateBox)

  • thisBox being a DOM reference to your table cell
  • thisHappened being the custom event you've defined as "this happens"
  • updateBox being the function or method that probably just adds a class name to the table cell, letting the CSS apply the necessary style changes

Another good writeup of custom events is:

Slashdot Top Deals

"An idealist is one who, on noticing that a rose smells better than a cabbage, concludes that it will also make better soup." - H.L. Mencken