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
How Do I Create a Pie Chart from a DataTable
VBA macro script populating cells from data source
RoundNumber with rounding off difference
Gateway for Server automatically being removed after restart
Replacing Keyboard on Toshiba Portege A600
Restore from older backups
Macro that will create 52 otherwise identical named ranges, each with a different number in the middle.
Showing Some Folders on my HTC HD2
HP PRINTER P3015 and P3005 cartridge compartible?
SSRS 2008 Data-Driven Subscription Errors - Email not sent