|
-
October 28th, 2009, 11:59 AM
#1
Updating DOM Node values dynamically (JS)
Hi all,
Having problems with JavaScript changing the nodeValue of some text. If I set x.nodeValue = "xyz", this will work fine and the page is updated accordingly.
But if I do
var myTxt = x.nodeValue.replace(y,z);
x.nodeValue = myTxt;
This does not update, however if I then follow with a document.write(x.nodeValue), it does print out the correct new data. Any ideas? Seems like the page does not recognize the need to "refresh" (forgive my lack of terminology here, new to this topic). I tried creating a new node, assigning myTxt to it, and replacing it in the node tree, however it just replicated the same problem as above. Maybe I did it wrong?
Tested on FF 3.5.3 and IE6, problem seems to exist on both.
Thank you for the time!
Last edited by aldend123; October 28th, 2009 at 12:05 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|