/    Sign up×
Community /Pin to ProfileBookmark

Passing an array to another function

Is there a way of passing an array of values from one function to another?

If it helps I am trying to preload images, then once the images have actually been downloaded fully then display the body of the page. The area I am having difficulty with is passing the array of images from the first function (preload()) to the second function (isImageLoaded()).

Any help much appreciated.

Thanks in Advance

Ben

[upl-file uuid=f8b518ed-cee2-4f96-8f19-fe413a76ddb7 size=2kB]test.txt[/upl-file]

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@bluestartechSep 22.2009 — just call the second function with array as argument
Copy linkTweet thisAlerts:
@Benji6996authorSep 22.2009 — I could do that but I do not want to because I do not want to have to have two occurrences of the images list:

[code=html]'images/body/back.jpg','images/body/cropAMPM.jpg','images/body/cropAC.jpg','images/body/cropCB.jpg','images/navigation/bslftCorn.gif','images/navigation/bsrhtCorn.gif','images/navigation/bsMid.gif','images/navigation/bsMidOn.gif','images/body/SMFoot.gif','images/navigation/darkOff.gif','images/navigation/darkOn.gif','images/navigation/bsrhtCornOn.gif','images/navigation/bslftCornOn.gif','images/navigation/navigator.jpg','images/navigation/subTop.png','images/navigation/subMid.gif','images/navigation/subBot.gif','images/body/PopupShadBot.png','images/body/PopupShadTop.png','images/body/PopupShadCn.png','images/body/diaryInsShadBot.png','images/body/diaryInsShadCn.png','images/body/diaryInsShadTop.png','images/body/loginBk.gif','images/body/vtourNavBack.gif'[/code]
×

Success!

Help @Benji6996 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 6.2,
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: @meenaratha,
tipped: article
amount: 1000 SATS,

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

tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,
)...