I have several JavaScripts in a web page. Each script is in an individual
file with extension .js.
I want to know if it is possible to put all functions in one single page.
If so, how do I call the specific script that I want to run.
This is how I call an individual script:
<SCRIPT LANGUAGE="JavaS cript" src="valForm.js "></SCRIPT>
Where valForm is a script that looks like this:
function valForm()
{
if( document.frmPas sword.txtInput. value == "password" )
document.locati on.href="Privat e.htm";
else
document.locati on.href="NoAcce ssPage.htm";
}
If a single script contains 5-10 functions, how do you call the specific
function you want?
Thanks in advance.
file with extension .js.
I want to know if it is possible to put all functions in one single page.
If so, how do I call the specific script that I want to run.
This is how I call an individual script:
<SCRIPT LANGUAGE="JavaS cript" src="valForm.js "></SCRIPT>
Where valForm is a script that looks like this:
function valForm()
{
if( document.frmPas sword.txtInput. value == "password" )
document.locati on.href="Privat e.htm";
else
document.locati on.href="NoAcce ssPage.htm";
}
If a single script contains 5-10 functions, how do you call the specific
function you want?
Thanks in advance.
Comment