Links

Lists

Latest Updates

Ruby On Rails List
Python list
Advanced Java
The JavaScript List
Apache Users
Full Disclosure
Linux Security

Search the archives!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Javascript] Comparing Strings


  • From: weirdit at gmail.com (Timothy White)
  • Subject: [Javascript] Comparing Strings
  • Date: Thu Aug 25 09:25:44 2005

On 8/25/05, Triche Osborne <wdlists@xxxxxxxxxxxxxxxxxx> wrote:
> Timothy White wrote:
> >
> > So what should I use instead of innerHTML?
> >
> 
> Kinda depends on how your XHTML is structured, but let's say you have a
> DIV, thus:
> 
> <div id="replaceThis">Text to be replaced.</div>
> 
> You'd do something like:
> 
> var replacementText = "Hi there!";
> var theNode = document.getElementById(nodeId);
> theNode.firstChild.data = replacementText;

Hmmm. Well that doesn't work cause I want to put HTML in there.
Is there any other way for HTML? Or is it just InnerHTML?
Otherwise I might try formatting the data differently.

Thanks

Tim