Calling a function of en external javascript file

Posted by strakastroukas on Stack Overflow See other posts from Stack Overflow or by strakastroukas
Published on 2010-05-29T12:37:59Z Indexed on 2010/05/29 12:42 UTC
Read the original article Hit count: 337

Filed under:
|
|
|

Hello. In general... How can I make a call on a function of an external javascript file?

More specific...

  • In the head tag i have

<script type="text/javascript" src="JScript/FontSize.js"></script>

  • The external javascript file, (that i would like to call) FontSize.js contains the following functions.

function checkCookie()

function setCookie(c_name, value, expiredays)

function getCookie(c_name)

function increaseFontSize()

function decreaseFontSize()

  • The FontSize.js is located at the ~/Jscript/ directory

I guess the body on load should contain something like

<body onload="/JScript/Fontsize.js/checkCookie()">

Of course nothing works as it should because, i do not know how to make the call to a function to an external js file

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about JavaScript