hi On 11/28/06, Lee Bettridge <[EMAIL PROTECTED]> wrote: > Is there a way to assign text to a div as html without using innerHTML ? > Or is there some other way of putting line breaks into the text ?
i think you want something like this: element.appendChild( document.createTextNode( str ) ); but since the <br /> is a markup element, you probably need to use document.createElement() to generate it [instead of just appending it to the string]. also, don't diss innerHTML. it's not perfect, and not DOM, but it's fast and works best in many contexts. -- \js [ http://or8.net/~johns/ ] ______________________________________________________________________ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d IE7 information -- http://css-discuss.incutio.com/?page=IE7 List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/