Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

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

irt.org | Knowledge Base | JavaScript | Misc | Q604 [ previous next ]

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

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>

Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 30th March 2008. Maintained by: Martin Webb and Michel Plungjan
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.