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.c ookies;
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 =---- 2 1923
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.c ookies;
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 =----
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.c ookies;
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 =---- This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Stefan Richter |
last post by:
Hi,
I want to create an associative Array with a PHP variable (article ID)
as Key
and another associative array as it's value.
How do I instanciate it, how can I fill it?
I want something like this:
|
by: Abdullah Kauchali |
last post by:
Hi folks,
Can one rely on the order of keys inserted into an associative Javascript
array? For example:
var o = new Object();
o = "Adam";
o = "Eve";
|
by: mark4asp |
last post by:
Suppose I have the following code. It functions to randomly select a
city based upon the probabilities given by the key differences in the
associative array. . Eg.
because the key difference between London and the previous element is
25 (40-15), London has a 25% chance of being selected.
When I call the function getAssocItem to do this I need to send in 2
arguments.
Is there a quick way to get the maximum key value in the associative
|
by: Robert |
last post by:
I am curious why some people feel that Javascript doesn't have
associative arrays. I got these definitions of associative arrays via
goggle:
Arrays in which the indices may be numbers or strings, not just
sequential integers in a fixed range.
www.sunsite.ualberta.ca/Documentation/Gnu/gawk-3.1.0/html_chapter/gawk_20.html
(n.) A collection of data (an array) where individual items can be
indexed (accessed) by a string, rather than by...
|
by: Derek Basch |
last post by:
Is there any way to associate name/value pairs during an array
initialization? Like so:
sType = "funFilter"
filterTypeInfo = ;
filterTypeInfo = new Array("type" : sType);
I can do it using this:
sType = "String"
| |
by: VK |
last post by:
Or why I just did myArray = "Computers" but myArray.length is
showing 0. What a hey?
There is a new trend to treat arrays and hashes as they were some
variations of the same thing. But they are not at all.
If you are doing *array", then you have to use only integer values for
array index, as it was since ALGOL.
|
by: scandal |
last post by:
I am a javascript newbie working on a script that checks whether a
"path" from one element in an array to another is "blocked." Currently,
the script pushes an already processed cell index (hence an integer)
into an array. To prevent rechecking already processed cells, the
script iterates through the (sorted) array to see whether that integer
is an element of the array.
After reading about javascript arrays a bit more, I thought...
|
by: Rene Nyffenegger |
last post by:
Hello everyone.
I am not fluent in JavaScript, so I might overlook the obvious.
But in all other programming languages that I know and that
have associative arrays, or hashes, the elements in the
hash are alphabetically sorted if the key happens to
be alpha numeric. Which I believe makes sense because
it allows for fast lookup of a key.
|
by: Antoine Merieux |
last post by:
Hi,
I'm trying to use associative array in another associative array
to feed it's ok
to retrieve, something's wrong
can you help me
thank you
<?php
session_start();
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |