Passing javascript variables between pages [duplicate]
Solution 1:
There are two obvious ways to maintain state in the browser without requiring that the server remember it between pages:
Cookies
localStorage
The latter is trivial to implement, but is only available in HTML5.
Note that neither is intended to be secure - a determined page hacker could set either to whatever value they wish.
Solution 2:
You can submit a form using get method <form method="get"
then use javascript to parse params in url. Reference here: