/    Sign up×
Community /Pin to ProfileBookmark

Passing array values to frame

Hello All,

I’m new to JavaScript, so be gentle. I was wondering how do I pass an array from one frame to another frame within the same frame set. I’m able to pass values but when I pass an array I get an error stating that the value is null of not an object.

frame one is call main_body frame two is called menu_body.

I’m trying to get the array from frame one from frame two. I use

code:

exportwin = window.open(“”,”displayWindow”);
exportwin.document.write(“<head><title>Message window</title></head>”);
exportwin.document.write(“<body>”);

var count = 0;
for (count =0; count < top.main_body.testarray.lenght; count++)
{
exportwin.document.write(top.main_body.testarray[count]);
}

Thanks

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@balloonbuffoonJan 06.2006 — [CODE][COLOR=Red]var count = 0;[/COLOR]
for (count =0; count < top.main_body.testarray.[COLOR=Red]lenght[/COLOR]; count++)[/CODE]

You spelled length wrong. (And you don't need to put count=0 above the for because the for statement sets it.

--Steve
Copy linkTweet thisAlerts:
@larryaseauthorJan 06.2006 — balloonbuffoon,

Thanks for the quick response, it was a typo in my code for referance to body_main not "lenght".
×

Success!

Help @larryase spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...