I am trying to create a function that executes all the functions listed
in an array. I cannot get it to work.
<html>
<body>
<script language="JavaScript">
var length_of_array = 2;
var function_array = new Array(
"no1()",
"no2()",
length_of_array);
function main_function(cat, cow)
{
for(var x = 0; x<cow; x++)
{
cat[x];
}
}
function no1()
{
alert("hello");
}
function no2()
{
alert("good bye");
}
</script>
<input type="button" value="click"
onClick="main_function(function_array, length_of_array)">
</body>
</html>
Your help will be appreciated.
Bundy