Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to avoid enclosing jsp's javascript in the included file(s)

 
Brusk Baran
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
is it possible?
my logic says no, but maybe..
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34372
345
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, you can include javascript functions in an external file. The file will only be downloaded to the user's machine once (unless it changes), so the same functions don't need to be downloaded repeatedly for multiple pages.
Example from this page:
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic