Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

call a JavaScript function from another JavaScript file  RSS feed

 
chamini prashakthi
Ranch Hand
Posts: 119
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how to call a java script function from another java script to in separate files?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65898
135
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
chamini prashakthi wrote:how to call a java script function from another java script to in separate files?

All JavaScript loaded into a page is loaded into the same namespace scope. So whether the functions are in different files or not is irrelevant. Any JavaScript code can call methods that are in scope on the page.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!