Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] Javascript and I have different ideas about what "concatenate" means.
- Date: Wed, 15 Dec 2010 23:47:57 +0900
- From: David Shanahan <david@example.com>
- Subject: Re: [tlug] Javascript and I have different ideas about what "concatenate" means.
- References: <4D08CDD3.5020806@example.com>
On Wed, Dec 15, 2010 at 11:16 PM, Dave M G <dave@example.com> wrote: > So it's as if the concat() function in Javascript is somehow looking at > the tree of div tags and adding it onto the outermost branch, instead of > doing what I wanted it to do, which is just treat it like a string and > append it to the end. Have you tried inspecting the "output" before assigning it to the innerHTML property ? My guess would be that the concat works as you expect but a transformation occurs when you assign to the innerHTML property. That transformation is the the parsing of the HTML string into DOM nodes then back to a HTML string. If there are any unclosed tags or other problems in the HTML it may not come out the same as it went in. Try looking for problems in the HTML. For example, I see that you are using the same id more than once on the div tags which is not strictly correct. Nesting problems though, are more likely caused by unclosed/unbalanced tags.
- Follow-Ups:
- References:
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] Javascript and I have different ideas about what "concatenate" means.
- Next by Date: Re: [tlug] Javascript and I have different ideas about what "concatenate" means.
- Previous by thread: Re: [tlug] Javascript and I have different ideas about what "concatenate" means.
- Next by thread: Re: [tlug] Javascript and I have different ideas about what "concatenate" means.
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links