Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #16538
| From | "Jukka K. Korpela" <jkorpela@cs.tut.fi> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Re: firstChild Problem -- Correction |
| Date | 2012-10-10 20:42 +0300 |
| Organization | A noiseless patient Spider |
| Message-ID | <k54c20$6gv$1@dont-email.me> (permalink) |
| References | <adlp3qFhpnlU1@mid.individual.net> <adlpunFi0gqU1@mid.individual.net> |
2012-10-10 20:35, Mel Smith wrote:
> In trying to simplify my example, I removed a lot of 'style' stuff from
> the <span>, so there really *is* or *should be* a firstChild, even though it
> starts out empty.
No, if you have <span></span>, then the element (as a DOM object or
otherwise) has no children.
Why don't you simply set innerHTML?
document.getElementById('srchtxt').innerHTML = "Searching ...";
--
Yucca, http://www.cs.tut.fi/~jkorpela/
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
firstChild Problem "Mel Smith" <med_cutout_syntel@aol.com> - 2012-10-10 11:20 -0600
Re: firstChild Problem -- Correction "Mel Smith" <med_cutout_syntel@aol.com> - 2012-10-10 11:35 -0600
Re: firstChild Problem -- Correction "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2012-10-10 20:42 +0300
Re: firstChild Problem Denis McMahon <denismfmcmahon@gmail.com> - 2012-10-10 17:40 +0000
Re: firstChild Problem Matt McDonald <matt@fortybelow.ca> - 2012-10-10 13:56 -0400
Re: firstChild Problem "Mel Smith" <med_cutout_syntel@aol.com> - 2012-10-10 12:13 -0600
csiph-web