[mochikit] add custom attributes with setNodeAttribute
Hi, I'm adding an atribute called 'tag' (is hard to chosse one name) with setNodeAttribute to attach one value that I would use soon, in FFox it's all OK, in IE this is a little bit harder, but works. Is it a bery bad practice? what you think? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit?hl=en -~--~~~~--~~--~--~---
[mochikit] Re: escapeHTML toHTML emitHTML and a simple space character
\u00A0 works fine thank you so much! =) On Jan 11, 7:47 pm, Bob Ippolito [EMAIL PROTECTED] wrote: On 1/11/07, dnuske [EMAIL PROTECTED] wrote: Hello all I have a problem thats making me crazy When I make my table mytable = TABLE({}, TBODY({}, TR({}, [ TD({'class':'myclass'}, 'someword'), TD({'class':'myclass'}, ' ') ] ) ) ) I need the space character because If it isn't TD wont aply the styles. the problem is: · if I put a space character, will be writen as a space, that means nothing to the html parses of navigators.DOM isn't HTML. It doesn't necessarily ignore spaces in the same way. · if I put escapeHTML(' ') (toHTML is as the safe) , will be writen as a space (I espected this to write nbsp; encoded space character) · if I put nbsp; the TD function (or some other) encodes the umpersand. so, writes amp;nbsp; (I would espect this if I pass the string for the escapeHTML)You don't expect the correct things from these functions. MochiKit.DOM doesn't work with HTML at all, it works with DOM functions. DOM functions do not deal with HTML input, except for innerHTML. The equivalent to nbsp; is '\u00a0'. A normal space character is '\u0020' (same thing as ' '). Anyway, if that doesn't work, then you're probably going to have to post a full example if you want help. A full example includes an entire HTML document, JavaScript, and CSS so that someone else can actually see what exactly your problem is and know when it's fixed. -bob --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit?hl=en -~--~~~~--~~--~--~---
[mochikit] escapeHTML toHTML emitHTML and a simple space character
Hello all I have a problem thats making me crazy When I make my table mytable = TABLE({}, TBODY({}, TR({}, [ TD({'class':'myclass'}, 'someword'), TD({'class':'myclass'}, ' ') ] ) ) ) I need the space character because If it isn't TD wont aply the styles. the problem is: · if I put a space character, will be writen as a space, that means nothing to the html parses of navigators. · if I put escapeHTML(' ') (toHTML is as the safe) , will be writen as a space (I espected this to write nbsp; encoded space character) · if I put nbsp; the TD function (or some other) encodes the umpersand. so, writes amp;nbsp; (I would espect this if I pass the string for the escapeHTML) I can't find the way to put a space =(. is this a bug? please help, I preach about mochikit in my workplace and I don't want to have problems o timeloss about this ^^ good loock for all, and for me ;) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit?hl=en -~--~~~~--~~--~--~---