Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

Q604 Is there a way to save/retain the values of global variables when the user resizes their web browser?

You are here: irt.org | FAQ | JavaScript | Misc | Q604 [ previous next ]

Keep a copy of the variables in hidden form fields:

<form name="myForm">
<input type="hidden" name="a">
<input type="hidden" name="b">
</form>

<script language="JavaScript"><!--
var a = 123;
var b = 'abc';

document.myForm.a.value = a;
document.myForm.b.value = b;
//--></script>

©2018 Martin Webb