Forum Moderators: open

Message Too Old, No Replies

how to get value of dom node before javascript change

         

johnhamman

10:11 pm on Feb 27, 2008 (gmt 0)

10+ Year Member



Hi all,
I have content on a page that is changed using someid.innerHTML = 'new content';
but what I would like to know is how to grab the original values that are hardcoded in the html even after it has been changed via javascript innerHTML?

any ideas
john

eelixduppy

10:14 pm on Feb 27, 2008 (gmt 0)



I'm not sure that you can once that has happen. You could make a global variable at the top of your script that stores the original value in there for future reference:

var old_html = someid.innerHTML;