[Wolves] javascript and dom question
Steve Parkes
sparkes at westmids.biz
Tue May 17 18:10:08 BST 2005
Steve Parkes wrote:
> Stuart Langridge wrote:
>
>> On 5/17/05, Steve Parkes <sparkes at westmids.biz> wrote:
>>
>>
>>> I have a textnode and I want to find all the newline characters and do
>>> an createElement('b') on them it's been about 5 years since I wrote
>>> more
>>> than 5 lines of javascript at a time ;-)
>>>
>>
>>
>> You want to do what? Why would you want to do that?
>>
>>
> I want to display breaks in the text ;-) It's actully your nice title
> code.
>
more specifically I want to do what I think this line should do ;-)
tnt = document.createTextNode(nicetitle.replace(/\n/g, "<br />"));
I think I want to split nicetitle along the newlines and build the node
from the component parts with <br /> between them.
I really need to spend some time with the dom. Last time I did any
scripts of substance it was all javascript 1.1 and busted innerHTML
model around here.
sparkes
More information about the Wolves
mailing list