Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-15-2009, 01:32 AM   PM User | #1
MissJane
New to the CF scene

 
Join Date: May 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
MissJane is an unknown quantity at this point
Onclick Call External JS File

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!
MissJane is offline   Reply With Quote
Old 05-15-2009, 02:10 AM   PM User | #2
bdl
Regular Coder

 
Join Date: Apr 2007
Location: Camarillo, CA US
Posts: 590
Thanks: 4
Thanked 83 Times in 82 Posts
bdl is an unknown quantity at this point
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.
bdl is offline   Reply With Quote
Old 05-15-2009, 03:04 AM   PM User | #3
MissJane
New to the CF scene

 
Join Date: May 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
MissJane is an unknown quantity at this point
I have about 30 images
MissJane is offline   Reply With Quote
Old 05-15-2009, 04:14 AM   PM User | #4
bdl
Regular Coder

 
Join Date: Apr 2007
Location: Camarillo, CA US
Posts: 590
Thanks: 4
Thanked 83 Times in 82 Posts
bdl is an unknown quantity at this point
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.
bdl is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:59 AM.


Advertisement
Log in to turn off these ads.