By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,384 Members | 1,886 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.

How to Access the Gobal variable from page to page?

P: 1
Hi.
I have two separate page 1 is test.js and test.html. In test.js i created one window with the help of window.open() method something like var p = window.open(url); I want p value in test.html page. how should i? and i am able to open a window. but i want the value of p.

Please help me..

Thanks..

Ashwath.
Sep 12 '06 #1
Share this Question
Share on Google+
1 Reply


PLA
P: 44
PLA
Hi.
I have two separate page 1 is test.js and test.html. In test.js i created one window with the help of window.open() method something like var p = window.open(url); I want p value in test.html page. how should i? and i am able to open a window. but i want the value of p.

Please help me..

Thanks..

Ashwath.

In the HEAD section of the caller

Expand|Select|Wrap|Line Numbers
  1. <script LANGUAGE="JavaScript">
  2.   var p;
  3.   function wop ()
  4.   {
  5.     p = window.open("C:\\test.html","toto");
  6.   }
  7. </script>
in the BODY section of the callee

Expand|Select|Wrap|Line Numbers
  1. <script LANGUAGE="JavaScript">
  2.   if (opener)
  3.     alert ("opener.p = " + opener.p);
  4. </script>
Sep 13 '06 #2

Post your reply

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