Possible Duplicate:
How should I include a js file from another js file?
In one of my js files, I need to use functions from other js file. How would I achieve this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You will need to include both files in any page that uses your functions.
The public functions in both files will be available to each other.
You could add a
<script>element to the DOM in your script that are pointing to the dependencies – this will allow you to only include your javascript file in a page.