![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
i have 2 .js files, mpi.js and functions.js the functions.js file contains common functions that i reference from my web pages. i have a function in mpi.js that needs to call one of the functions from functions.js but i dont know how to do this. if memory serves me in Java you had to use the import statement, but that does not appear to work in this case. Snoopie |
#3
| |||
| |||
|
|
On Thu, 03 Aug 2006 13:36:10 GMT, Snoopie <none (AT) ya (DOT) biz> wrote: i have 2 .js files, mpi.js and functions.js the functions.js file contains common functions that i reference from my web pages. i have a function in mpi.js that needs to call one of the functions from functions.js but i dont know how to do this. if memory serves me in Java you had to use the import statement, but that does not appear to work in this case. Snoopie ha, i answered my own question the code is as follows in the mpi.js i just needed to add // include functions.js document.write("<script language='Javascript' type='text/javascript' src='scripts/functions.js'></script>"); note that i keep my scripts in a subfolder called scripts i hope this helps out someone else Snoopie Just want to add this - don't make the mistake of thinking that |
![]() |
| Thread Tools | |
| Display Modes | |
| |