WGIS
07-20-2005, 01:03 PM
I have some .js files that "my" website reloads when certain functions are executed. This is a problem because I want to store one variable. There is also a html-document from where the .js files are loaded.
I want to declare the variable in the html-document but want to be able to update it and check it from the .js files. When the html-document is reloaded the variable should be reset.
in the html-file I guess I just go with:
<SCRIPT type="text/javascript" language="JavaScript">
var myVariable = 0;
</SCRIPT>
But what I don't get is how to update it in the html and how to use it in the .js functions.
I want to declare the variable in the html-document but want to be able to update it and check it from the .js files. When the html-document is reloaded the variable should be reset.
in the html-file I guess I just go with:
<SCRIPT type="text/javascript" language="JavaScript">
var myVariable = 0;
</SCRIPT>
But what I don't get is how to update it in the html and how to use it in the .js functions.