Skip to main content

calling a .js file from with a .js file

3 replies [Last post]
jbetts1967
Offline
Joined: 2007-12-04

im currently working on a website and have ran into a problem....

i have a "master.js" file and i need it to call another ,js file from within the "master.js" file.... ie...

switch (number)
{
case 1: current code
case 2: current code
}

change to:

switch (number)
{
case 1: call file01.js
case 2: call file02.js
}

how can this work....

thanks....

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
olakara
Offline
Joined: 2006-06-21

hi,
To load Js files dynamically in a switch case..

switch(con) {

case con:
document.write('