I need some help, here.
I need to call this .js file automatically,
not with an onClick function.
How can I call a .js file in a situation like the following:
----------------------------------
var cnt = "2";
----------------------------------
This call should load a .js file named "21.js".
I have tried all kinds of stuff. Now my mind is mush.
Please help, if you can.
Comments
: I need to call this .js file automatically,
: not with an onClick function.
: How can I call a .js file in a situation like the following:
: ----------------------------------
:
: var cnt = "2";
:
:
: ----------------------------------
: This call should load a .js file named "21.js".
: I have tried all kinds of stuff. Now my mind is mush.
: Please help, if you can.
:
: : I need to call this .js file automatically,
: : not with an onClick function.
: : How can I call a .js file in a situation like the following:
: : ----------------------------------
: :
: : var cnt = "2";
: :
: :
: : ----------------------------------
: : This call should load a .js file named "21.js".
: : I have tried all kinds of stuff. Now my mind is mush.
: : Please help, if you can.
: :
:
:
I believe all you should have to do is the following:
And 21.js includes:
alert("Hello there!");
Remember 21.js must be in the same directory as your calling file. Otherwise use the following:
: : : I need to call this .js file automatically,
: : : not with an onClick function.
: : : How can I call a .js file in a situation like the following:
: : : ----------------------------------
: : :
: : : var cnt = "2";
: : :
: : :
: : : ----------------------------------
: : : This call should load a .js file named "21.js".
: : : I have tried all kinds of stuff. Now my mind is mush.
: : : Please help, if you can.
: : :
: :
: :
:
: I believe all you should have to do is the following:
:
:
:
:
:
: And 21.js includes:
:
:
: alert("Hello there!");
:
:
: Remember 21.js must be in the same directory as your calling file. Otherwise use the following:
:
:
:
:
:
:
Thanks for the effort. This has all got to be dynamic. By that I mean, not HARD CODED.
: I need to call this .js file automatically,
: not with an onClick function.
: How can I call a .js file in a situation like the following:
: ----------------------------------
:
: var cnt = "2";
:
:
: ----------------------------------
: This call should load a .js file named "21.js".
: I have tried all kinds of stuff. Now my mind is mush.
: Please help, if you can.
:
I will post the answer later tonight for anyone that might want to know how to do this. It ended up being pretty easy.
: I need to call this .js file automatically,
: not with an onClick function.
: How can I call a .js file in a situation like the following:
: ----------------------------------
:
: var cnt = "2";
:
:
: ----------------------------------
: This call should load a .js file named "21.js".
: I have tried all kinds of stuff. Now my mind is mush.
: Please help, if you can.
:
This how to do it. I even got it to loop thru a 'for' loop and load 4 different .js files. It will read the following files:
('11.js' & '21.js' & '31.js' & '41.js')
-------------