Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Javascript] Comparing Strings - Correction
- From: wdlists at triche-osborne.com (Triche Osborne)
- Subject: [Javascript] Comparing Strings - Correction
- Date: Thu Aug 25 09:20:12 2005
Oops! I had this in a testing function and forgot to replace the passed
variable with its literal.
This line:
> var theNode = document.getElementById(nodeId);
Should read:
var theNode = document.getElementById("replaceThis");
The corrected version would look like this:
<div id="replaceThis">Text to be replaced.</div>
var replacementText = "Hi there!";
var theNode = document.getElementById("replaceThis");
theNode.firstChild.data = replacementText;
Sorry for the confusion!
Triche
- References:
- [Javascript] Comparing Strings
- From: Timothy White
- [Javascript] Comparing Strings
- From: Nick Fitzsimons
- [Javascript] Comparing Strings
- From: Timothy White
- [Javascript] Comparing Strings
- From: Triche Osborne
- [Javascript] Comparing Strings
- Prev by Date: [Javascript] Iframe Permission Denied
- Next by Date: [Javascript] Comparing Strings
- Previous by thread: [Javascript] Comparing Strings
- Next by thread: [Javascript] Comparing Strings
- Index(es):