I
Iddo
Hi,
I am having a strange problem...
I have an HTML file which has 2 script tags:
1) <script language="javascript" id="ABC" src="ABC.js" />
2) <script id="general" language="javascript">
function foo()
{
alert("aaa");
}
</script>
I am trying to call the "foo" function and also functions from the
"ABC.js" file.
when calling the ".js" file - functions are called fine!
however, when calling the "foo" function - I get an error! ("Object
expected")
My HTML:
<HTML>
<head>
<script language="javascript" id="ABC" src="ABC.js" />
<script id="general" language="javascript">
function foo()
{
alert("aaa");
}
</script>
<title>Test</title>
</head>
<body>
<INPUT id="Button1" type="button" value="JS1"
onclick="JSFileFunction()"></P>
<INPUT id="Button2" type="button" value="JS2" onclick="foo()"></P>
</body>
</HTML>
My ABC.js file:
function JSFileFunction()
{
alert("ABC");
}
PLZ help me.... I'm stuck!!!
I am having a strange problem...
I have an HTML file which has 2 script tags:
1) <script language="javascript" id="ABC" src="ABC.js" />
2) <script id="general" language="javascript">
function foo()
{
alert("aaa");
}
</script>
I am trying to call the "foo" function and also functions from the
"ABC.js" file.
when calling the ".js" file - functions are called fine!
however, when calling the "foo" function - I get an error! ("Object
expected")
My HTML:
<HTML>
<head>
<script language="javascript" id="ABC" src="ABC.js" />
<script id="general" language="javascript">
function foo()
{
alert("aaa");
}
</script>
<title>Test</title>
</head>
<body>
<INPUT id="Button1" type="button" value="JS1"
onclick="JSFileFunction()"></P>
<INPUT id="Button2" type="button" value="JS2" onclick="foo()"></P>
</body>
</HTML>
My ABC.js file:
function JSFileFunction()
{
alert("ABC");
}
PLZ help me.... I'm stuck!!!