...

View Full Version : Onclick Call External JS File



MissJane
05-15-2009, 01:32 AM
Hi,

I have a JavaScript image gallery that loads in a DIV. I have 4 different Galleries - each with their own image array stored in it's own External JavaScript file.

What I want to do, is when you click on a link to any of the 4 galleries that an onclick function calls the relevant external JavaScript file and then loads the array of images in the same DIV. I want to remain on the same page at all times...just a different array of images is seen by the user in the DIV.

Probably simple...but tricky for me!

Any help would be awesome..Cheers!

bdl
05-15-2009, 02:10 AM
How many images are we talking about? You might save some overhead by simply loading the image array (after the document loads) and having the image available at any time.

MissJane
05-15-2009, 03:04 AM
I have about 30 images

bdl
05-15-2009, 04:14 AM
30 images total, I'd just populate a single array and load it after the page loads. If you need to separate them by sections, use a multidimensional array, one inner array per section.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum