Call external functions

K

kirkox

Hi guys, this is my first post. I am a newbie, of course.

The question is really simple:
how can I call functions from an external file in a new js file and
work with its method?

Thank in advance.
Bye
 
B

Benjamin

Hi guys, this is my first post. I am a newbie, of course.

The question is really simple:
how can I call functions from an external file in a new js file and
work with its method?
First make sure you have a tag like this:
<script type="application/x-javascript"
 
C

cwdjrxyz

<script type="application/x-javascript"
src="path/to/my/js.js"></script>

The above is correct. However I caution you not to also add the opening
and closing script tags to your external script file, or the script
will not work. This is a very frequent error made by those using
external script files for the first time.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,045
Latest member
DRCM

Latest Threads

Top