Click to See Complete Forum and Search --> : seperate calls to the same .js file on page load


iambagels
08-22-2005, 06:27 PM
SHORT VERSION...
i need some help for a website i'm working on. i need to be able to call javascript functions one at a time on page load (no onClick events) or i need to be able to access variables from one .js file in another .js file.
LONG VERSION...
i'm working on a site for my college radio station and i have an object which contains dj name, show name, website, and name of picture file. i need to access this object at the top of the page to display "it's 8:20 on a tuesday night. tune in now to hear john doe" with a link to his page. further down the page i want to access an array of all shows and randomly select once to be the image displayed as the featured show with link to their webpage or the station schedule. i also want to use the script to help create the schedule pages. i don’t want to make the entire website in a javascript file because that would be a pain in the balls especially since i just learned it this summer.

thanks for your help.

iambagels
08-25-2005, 09:38 AM
if i sould be using something other than java script please tell me, i would realy like to have this feature for my page. here's what it looks like as of right now so you can get a better idea of what i'm doing where i need to make the calls.

http://www.geocities.com/andy_balcom/WNEK/home.htm
[i know it's invalid html and i know i should be using css, i know i should get off geocities. this is my first big web project, cut me some slack]

RossC0
08-25-2005, 10:28 AM
Are you just using HTML ? If so Javascript will be required. Just put all the javascript functionality in one file. You can reference it as many times as required and call multiple functions onload just have them separated by a semi colon ;