[thelist] trouble with the DOM and spaces

s t e f evolt at nota-bene.org
Thu Aug 26 02:58:50 CDT 2004


<quote who="Theodore Serbinski">
> so it seems i've hit a little snag, in my otherwise great script i'm
> writing. i have this html code, as formated below:
>
> <dl>
> 	<dt>some titel</dt>
> 	<dd>something goes here</dd>
> </dl>
>
> and i'm trying to find the nextSibling to the DT. in IE6, it reports DD
> but in Firefox it says #text, refering to the hard return there. my
> question is there any way around this, coding wise? i mean i could
> reformat my document so there is no space but then it becomes quite
> unreadable, especially considering it is a very long html file. and
> testing to see whether i'm using IE6 or Firefox seems way too late
> 1990's. maybe i'm missing the use of the function and DOM? thoughts?

<quote who="Theodore Serbinski">
> so it seems i've hit a little snag, in my otherwise great script i'm
> writing. i have this html code, as formated below:
>
> <dl>
> 	<dt>some titel</dt>
> 	<dd>something goes here</dd>
> </dl>
>
> and i'm trying to find the nextSibling to the DT. in IE6, it reports DD
> but in Firefox it says #text, refering to the hard return there. my
> question is there any way around this, coding wise? i mean i could
> reformat my document so there is no space but then it becomes quite
> unreadable, especially considering it is a very long html file. and
> testing to see whether i'm using IE6 or Firefox seems way too late
> 1990's. maybe i'm missing the use of the function and DOM? thoughts?

Yeah, well, I've tried to google a solution but found nothing satisfying,
but here's what I saw somewhere and can't seem to get my hands on again:

Test the nodeType of currentObject.nextSibling, and if it's a DD then here
goes: you found it.

(sorry I can't tell you more, though)

(side note: can we have a sneak peek on your script? ;))


-- 
s t e f
personal: http://nota-bene.org/
org: http://evolt.org/
french org: http://pompage.net/


-- 
s t e f
personal: http://nota-bene.org/
org: http://evolt.org/
french org: http://pompage.net/


More information about the thelist mailing list