Hi
I have the following simple function in a file called functions.js (which is located in a subfolder called "includes"):
function DisplayMenu(){
document.write("Test");
}
I then have an ASP file called default.asp which calls the function above as follows:
<!--#include file="includes/functions.js"-->
This is placed inbetween the <head> tags although I have tried placing it before the <html> tags and also tried placing it in the main body - it seems as though the positioning of this include statement makes no difference.
I then have the following <body> tag in default.asp:
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="writeMenus(), openPeeker()" onResize="if (isNS4) nsResizeHandler()">
The functions within the body tag are all also in the file functions.js.
I then call the function DisplayMenu() in the main body of default.asp:
<script type="text/javascript">
DisplayMenu()
</script>
-------------------------
Ok my problem is everything works BUT in the bottom left of the screen when default.asp is displayed in the browser there is a yellow triangle with an exclamation mark and when clicked says I have the following error:
Line: 831 (which is well beyond the last </html> tag by the way)
Char: 1
Error: Object expected
Code: 0
URL: default.asp
I have checked all the spelling and syntax and I do not think I have made any mistakes (for example missing quotes etc) so cannot see why I am getting this error. I have removed all other code in the default.asp file to narrow down the problem and it is clearly a problem related to the <body> tag I have and also the way I am calling the DisplayMenu() function.
By the way my browser is IE6 running on Windows2000, although the latter shouldn't make a difference.
I will really appreciate any help as I have been trying to solve this problem for a week now. Thank you very much in advance.
Les
I have the following simple function in a file called functions.js (which is located in a subfolder called "includes"):
function DisplayMenu(){
document.write("Test");
}
I then have an ASP file called default.asp which calls the function above as follows:
<!--#include file="includes/functions.js"-->
This is placed inbetween the <head> tags although I have tried placing it before the <html> tags and also tried placing it in the main body - it seems as though the positioning of this include statement makes no difference.
I then have the following <body> tag in default.asp:
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="writeMenus(), openPeeker()" onResize="if (isNS4) nsResizeHandler()">
The functions within the body tag are all also in the file functions.js.
I then call the function DisplayMenu() in the main body of default.asp:
<script type="text/javascript">
DisplayMenu()
</script>
-------------------------
Ok my problem is everything works BUT in the bottom left of the screen when default.asp is displayed in the browser there is a yellow triangle with an exclamation mark and when clicked says I have the following error:
Line: 831 (which is well beyond the last </html> tag by the way)
Char: 1
Error: Object expected
Code: 0
URL: default.asp
I have checked all the spelling and syntax and I do not think I have made any mistakes (for example missing quotes etc) so cannot see why I am getting this error. I have removed all other code in the default.asp file to narrow down the problem and it is clearly a problem related to the <body> tag I have and also the way I am calling the DisplayMenu() function.
By the way my browser is IE6 running on Windows2000, although the latter shouldn't make a difference.
I will really appreciate any help as I have been trying to solve this problem for a week now. Thank you very much in advance.
Les