शेखर
शेखर

Reputation: 17614

Share Javascript Variable on two pages

I have A page a.aspx and another page b.aspx. I am using http://flowplayer.org overlay to open b.aspx on page a.aspx. Now I want to use a variable (java script) on page b.aspx which is declared on page a.aspx. Is it possible to do so.

Thanks.

Upvotes: 2

Views: 168

Answers (2)

Sandeep G B
Sandeep G B

Reputation: 4015

Quick answer is "No".

If you are having .aspx pages inside other container (Frame) then you can share it by having your variable as part of the parent page.

Other options are

  1. Client side - Cookies (persistent/non-persistent) depending on your requirement
  2. Server side - using session (as suggested by Hemant Metalia)

Upvotes: 0

Hemant Metalia
Hemant Metalia

Reputation: 30648

you can use session for it refer this http://www.thomasfrank.se/sessionvars.html

another way is to use windows.location for that see http://www.htmlgoodies.com/beyond/javascript/article.php/3471111/A-Quick-Tutorial-on-JavaScript-Variable-Passing.htm

Upvotes: 3

Related Questions