Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror

Slashdot videos: Now with more Slashdot!

  • View

  • Discuss

  • Share

We've improved Slashdot's video section; now you can view our video interviews, product close-ups and site visits with all the usual Slashdot options to comment, share, etc. No more walled garden! It's a work in progress -- we hope you'll check it out (Learn more about the recent updates).

×

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

by Isofarro (#28064489) Attached to: HTML 5 As a Viable Alternative To Flash?

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: http://developer.yahoo.com/yui/examples/event/custom-event.html 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: http://nefariousdesigns.co.uk/archive/2007/07/ajaxevent-using-yui-custom-events-with-ajax/

Are you having fun yet?

Working...