Connecting Tech Pros Worldwide Help | Site Map

Call external functions

 
LinkBack Thread Tools Search this Thread
  #1  
Old January 24th, 2007, 12:45 AM
kirkox
Guest
 
Posts: n/a
Default Call external functions

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


  #2  
Old January 24th, 2007, 01:55 AM
Benjamin
Guest
 
Posts: n/a
Default Re: Call external functions



On Jan 23, 7:40 pm, "kirkox" <mircovel...@gmail.comwrote:
Quote:
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"
src="path/to/my/js.js"></script>
Then you can just call the function like it was in the same file!
Quote:
>
Thank in advance.
Bye
  #3  
Old January 24th, 2007, 04:15 AM
cwdjrxyz
Guest
 
Posts: n/a
Default Re: Call external functions



On Jan 23, 8:42 pm, "Benjamin" <musiccomposit...@gmail.comwrote:
Quote:
On Jan 23, 7:40 pm, "kirkox" <mircovel...@gmail.comwrote:Hi guys, this is my first post. I am a newbie, of course.
>
Quote:
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"
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.

 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.