On May 20, 2006, at 5:46 PM, jeff wrote:

>
> I'm kind of new to mochikit and I'm having an issue with building a
> table.  The table works fine but what I would like to do is make a TD
> element optional.  I have a checkbox but only want it to appear if  
> when
> I'm looping over data that when details.exports[i].contact is not null
> display, otherwise replace with an empty TD.  I know i have to  
> prebuild
> the variable to do this and place it in the appendchild but not  
> sure of
> the format.

You could do it inline if you wanted.. null and undefined are simply  
ignored by MochiKit.DOM.

((details.exports[i].contact) ? INPUT( ... ) : null)

I would definitely recommend changing your code so that you use a  
local variable instead of writing details.exports[i] ten times though.

-bob


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"MochiKit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/mochikit
-~----------~----~----~----~------~----~------~--~---

Reply via email to