Microsoft
Software
Hardware
Network
Question : Javascript function in external js file does not execute
I have a simple js function
<head>
...
<script type="text/javascript" language="javascript">
function ol5()
{
return overlib('Popups present ancillary information.');
}
</script>
...
</head>
that executes correctly when embedded in the <head> section of a page, but that does not execute when contained in an external js file:
<head>
...
<script type="text/javascript" src="ol_functions.js"></sc
ript>
...
</head>
where the external file ol_functions.js, which resides in the same folder as the html page, contains exactly
function ol5()
{
return overlib('Popups present ancillary information.');
}
Any suggestions would be appreciated.
Answer : Javascript function in external js file does not execute
Try this:
<script type="text/javascript" src="./ol_functions.js"></sc
ript>
Random Solutions
"bad request" when trying to access 'options' page in Exchange 2010 OWA
What is the proper DNS settings for ...
Hex to ASCII conversion in C#
Custom Search Page and Impersonation
How do I dynamically sum up/display customcontrol (ascx control in the item template) values into an asp:repeater footer?
how do you read a list of links from a sql database SP and print the list on a aspx .NET ASP page C#
System Config utility opens at login everytime
Cannot puTTY to Fedora 13
How do I resolve this error "javax.xml.ws.WebServiceEx
ception .... Place the resource correctly in the classpath.?
Cannot connect to database errors