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
VB.Net exe, icon and shortcut
How do I check if a window is already open or give it focus using Flex/Flash
Windows Server 2008 NLB Issue
DSUM with multiple rows and multiple columns
IOS VPN Configuration for iPhone
Migration from 2003 SBS to 2008 Foundation Server
Wireless Internet problem
Older Flash document potential issues
Plug n Play/USB/Registry Nigtmare - I Need to regularly delete keys in order to "detect" my MP3 Player!
Translate web site