How to revert to content of a Dijit text box when browser back-button is clicked?
I am using a Dojo Textarea Dijit to input and submit text (to be processed).
I found that after submiting, if a browser back-button is pressed (IE8, Firefox) unlike regular HTML Textarea, I ret开发者_StackOverflow中文版urn to the input screen, but the Textarea is EMPTY.
What I would like to happen is that after back-button is pressed, I would return to the previous page WITH the previously written text already in the Textarea - so that I can edit it, instead of writing it all again.
Can anyone explain how I do that (and some specific code example would be appreciated).
Thanks, Barry.
You may consider using dojo.back module: http://dojocampus.org/content/2009/05/17/using-dojo-back-button-and-bookmarks to store the page's state and handle back / forward events.
However not sure if it's worth powder and shot in your case. :)
精彩评论