Does Javascript suport Global arrays - Passing data between to dif

F

Frank H. Shaw

Does Javascript support Global arrays - Passing data between to dif pages - I
need to know is there a way to setup a global array to be used to pass data
between to dif pages. Where on a website on what page do we need to setup the
global array and what is the syntic for setting up a global array then I need
to see how to address the global array and load data in to it and allso take
data out. THANKS
 
M

MikeR

Session variables are global. I don't know if they can be treated as an array.
session("boo") = "hoo" set in say the homepage. Tthen every other page opened in
that session can access sessiion("boo"). They do expire when the session ties out,
which is a server setting.
MikeR
 
K

Kevin Spencer

It should be noted that MikeR is referring to ASP (Active Server Pages),
which is a server-side programming technology, and has nothing in particular
to do with client-side JavaScript. Also, yes, since all ASP variables are
Variants, you can indeed store an ASP array in Session.

JavaScript supports passing data between a parent and child window. That is,
the parent window has opened a window using window.open(...). The child
window is accessed by the parent via its handle, which is returned by the
window.open(...) method, and the child window can access the parent via its
"opener" property.

As to the term "global," that depends on what you mean by "global." This is
an issue of scope. Any variable declared outside of a function is global to
the page, and is therefore, available to the parent or child window by the
other.

The following web page gives a tutorial on JavaScript arrays:

http://www.pageresource.com/jscript/jarray.htm

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Ambiguity has a certain quality to it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top