More Scripts
Follow the links below for more scripts.
FREE Scripts

Premium Scripts

Custom Scripts

Home Templates Design Tools More Tools Logos Scripts Shop
Search our on-line Store
Copyright © 2012-2014 RichoSoft -  All Rights Reserved | Terms of Use | Privacy Policy
Donate and
help me add more FREE content
How to pass javascript variables from page to page
Have you ever had a variable on a web page that you wanted to pass onto another page? Here’s how to do it.
On the page that has the required variables on it add the following code:
Where thenewpage.html is the page to transfer the variables to, Var1, Var2 are the names to give the transmitted variables (one or more) and firstVariable and secondVariable are the names of the original variables on the first page.
Add an onclick event to the image, button or link that will open the second page like: onclick=”openNewWithVariables()”
When the link is clicked the link to open the page will appear in the address bar something  like:  thenewpage.html?Var1=thevalue&Var2=thesecondvalue

On the Page that will be accepting the variables add this code to the <head> section:
And this just before the </head> tag of the page:
The variables from the first page are now available to the javascripts on the second page.
Not sure how to implement? Drop me a line and I will help as much as I can.

Hope you find this useful.