reset variables on page refresh
Hi,
when reloading a page containing some jquery code based variables (which are: a variety of datepickers with set dates, and a number of form textfields containing calculated and formatted monetary values) it appears that those variables remain set. If I set a variable on the page (in a form field) then refresh the page I would like for everything to be cleared out (start with a clean slate).
I work around this by setting standard values to all those fields and datepickers manually, but I would rather avoid that and clear all variables/set values, rather than assigning a value to all those fields and datepickers manually to remove previous usage traces of the page. I want the refresh to behave like a full reload.
I read somewhere that loading jquery with a variable at the end of the url string would achieve that. While I know how to o that, I would rather use just jquery and make sure cache / variables are cleared each time the page is loaded. My main reason for that is I'd like users to take advantagef of google APIs (so they use a cached jQuery version, for faster page loading).
I hope that is clear... not a native speaker so forgive my english :P
any help would be greatly appreciated.
an example of the page (with manual workaround in the code) can be seen at http://www.fondsit2.be/notionnel/
I work around the issue by using
- $(function(){//clear all numbers on refresh or new pageload.
- $("input.nbr").val("0,00");
- });
thanks
Greg