By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,384 Members | 1,847 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,384 IT Pros & Developers. It's quick & easy.

declaring global variables in javascript

P: 1
how can i decalre global variables in javascript so that the value which is held by global variable is carried to and fro between html pages to display some items based upon the value in the global variable.
Aug 28 '06 #1
Share this Question
Share on Google+
1 Reply

Expert Mod 5K+
P: 8,916
You can't, javascript variables are local to the age they are on.

What you can do is

pass variables using a cookie to store them

pass variables on the URL for the next page to pick up (either by manually writting the URL or through form submission).
Aug 28 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.