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

Copying an associative array from one frame to another

P: n/a
Don
Using JS, how do I copy an associative array from one frame to another?

Here's what I tried, and didn't work.

In "main" frame referencing "header" frame:

var cookies = new Object();
cookies = parent.header.cookies;

Actually, I'm having the same problem with copying a simple variable. The error message says the
object is undefined or null.

Could it be a timing race between the two frames? Data I'm trying to copy has to be resolved first
in the header frame. There's no human intervention involved, just simply the time to load the
frames and execute them. Does the execution of the statements involving data from another frame
pause until that data is available?

Thanks for any help.
Don

----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Jul 23 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Don
On Sat, 19 Feb 2005 21:35:01 -0700, Don <no@adr.com> wrote:
Using JS, how do I copy an associative array from one frame to another?

Here's what I tried, and didn't work.

In "main" frame referencing "header" frame:

var cookies = new Object();
cookies = parent.header.cookies;

Actually, I'm having the same problem with copying a simple variable. The error message says the
object is undefined or null.

Could it be a timing race between the two frames? Data I'm trying to copy has to be resolved first
in the header frame. There's no human intervention involved, just simply the time to load the
frames and execute them. Does the execution of the statements involving data from another frame
pause until that data is available?

Thanks for any help.
Don

----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----

I take that back, I can successfully copy simple variables with no problem. But, still can't copy
an associative array. Still get undefined or null.

Don

----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Jul 23 '05 #2

P: n/a
Don
On Sat, 19 Feb 2005 21:54:05 -0700, Don <no@adr.com> wrote:
On Sat, 19 Feb 2005 21:35:01 -0700, Don <no@adr.com> wrote:
Using JS, how do I copy an associative array from one frame to another?

Here's what I tried, and didn't work.

In "main" frame referencing "header" frame:

var cookies = new Object();
cookies = parent.header.cookies;

Actually, I'm having the same problem with copying a simple variable. The error message says the
object is undefined or null.

Could it be a timing race between the two frames? Data I'm trying to copy has to be resolved first
in the header frame. There's no human intervention involved, just simply the time to load the
frames and execute them. Does the execution of the statements involving data from another frame
pause until that data is available?

Thanks for any help.
Don

----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----

I take that back, I can successfully copy simple variables with no problem. But, still can't copy
an associative array. Still get undefined or null.

Don

----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----

I finally got the array to copy properly, but still have a timing problem. See my new post below.

Thanks,
Don

----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Jul 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.