Friday, July 31, 2009

How do I keep my HTML page from automatically resetting itself after javascript modifies it?

I have an HTML document that is modified based on javascript actions modifying the DOM. For some reason, the last action is to reset the page, so the changes don't persist. I don't understand why.

How do I keep my HTML page from automatically resetting itself after javascript modifies it?
all changes happen inside the page. they never get out to your disk or the server... UNLESS you store your changes in a cookie or use ajax tricks to save them back on the server.





a simple thing, like which part of the dom you are showing can be done by modifying the hash part of the url (like a normal %26lt;a href="#somewhere"%26gt; and when the page is loaded you look at the hash and re-modify the dom!


No comments:

Post a Comment