0

Possible Duplicate:
Calling a javascript function from another .js file

i'm new to javascript. And i just want to know how to call javascript function in one javascript file from another ? call a function in temp.js from main.js

1

2 Answers 2

0

All you have to do is include both JavaScript files on the page. Assuming both functions are declared at the window level, they'll all be call-able from one another.

Sign up to request clarification or add additional context in comments.

Comments

0

Just make sure that the files with the javascript code is with in the html document and you're able to call any functions located in any file from one file to another.

1 Comment

Your answer answers the question on "how to call from one file a function located in another" by saying basically: "make sure you are able to call functions in one file from another file". Obviously worth a downvote.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.