FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Multidimensional Arrays & passing info between windows





LukeakaDanish
Javascript:

In the following code:

dataNr har been set to the number of files in "data" (0)
data has been defined as an array in my parent window

Code:

      opener.data[dataNr] = new Array();
      opener.data[dataNr][0] = 'simpleplot1';
      alert('error');


Im attempting to pass some data from a "pop-up" window i have created with javascript, back to my main window. The info needs to end in an array (data), in which the items are arrays (data[dataNr]).

The wierd thing is that the above script never reaches the alert. It does, however reach the second line, where it produces the error
Quote:
opener.data[dataNr] har no propperties


To me this makes no sence...any suggestions?

Thanks in advance ppl...i know from the past that your worth it Very Happy

Regards

Luke
Marston
I know nothing about JavaScript, but I do know PHP, and defining and calling functions is basically the same between the two languages...
Code:
opener.data[dataNr] = new Array();
Shouldn't new Array(); have something in the brackets?
LukeakaDanish
nope...doesnt have to have anything...you can set up an array without passing it any content...though before posting here that was one of the many stupid solutions i tried...

Thanks for the reply though...

If i dont get any answers i will just trying to do it by pulling the information with the "opener" instead of passing it with the opener the information with the new window...
LukeakaDanish
I found my bug Very Happy

Accidentally had two varialbes with the same name in my opener script which killed the whole thing... Evil or Very Mad

Please close this thread.
Related topics
Shutdown & Restart Shortcuts for Windows XP & Window
foobar or winamp?
Windows vs. Mac OS
How to Protect ur windows System
Windows or Linux
Booting Linux using Windows boot loader
Which Linux?
Microsoft Launches Webcams
Diff: Windows 2000 Vs Windows server 2003
Windows doesn't installs partition table damage
difference between windows xp service pack and sp 2 rc 1
Windows Vista vs Mac OS X
Inserting PHP multidimensional arrays into a mySQL database
WinXP to Linux Instead of Windows 7
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.