View Single Post
Old 09-14-2012, 10:15 PM   PM User | #11
RGVBaptist
New to the CF scene

 
Join Date: Sep 2012
Posts: 6
Thanks: 3
Thanked 0 Times in 0 Posts
RGVBaptist is an unknown quantity at this point
Quote:
Originally Posted by rdspoons View Post
You need to watch out for overwriting your dynamic srcripts when you use .innerHTML.

The DOM can be used to add the break, instead of using innerHTML, and it will avoid overwrite issues:
In place of...
document.getElementById("lstValues").innerHTML = document.getElementById("lstValues").innerHTML + "<br>";
You can use...
document.getElementById("lstValues").appendChild(document.createElement("br"));
lol -- well that would have certainly been easier than the workaround I put in place. Will have to change my code to use what you just gave. I've been out of the loop for many years, so some of my programming methods/styles are severely antiquated. I can make it do what I want, but it ain't pretty. Thanks for the help.
RGVBaptist is offline   Reply With Quote