How to Access the Gobal variable from page to page?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • anoashu
    New Member
    • Sep 2006
    • 1

    How to Access the Gobal variable from page to page?

    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.
  • PLA
    New Member
    • Aug 2006
    • 44

    #2
    Originally posted by anoashu
    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

    Code:
    <script LANGUAGE="JavaScript">
      var p;
      function wop ()
      {
        p = window.open("C:\\test.html","toto");
      }
    </script>
    in the BODY section of the callee

    Code:
    <script LANGUAGE="JavaScript">
      if (opener)
        alert ("opener.p = " + opener.p);
    </script>

    Comment

    Working...