Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to call javascript function of another jsp from one jsp

 
Rohit Kumar
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am new to JSP.

I want to know, how to call javascript function which is present in say "one.jsp", from another jsp's (say "two.jsp") javascript function.

thanks in advance.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64633
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Firstly, this has nothing to do with JSP, so it's been moved to a more appropriate forum.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64633
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Secondly, the question is impossible to answer without knowing the relationship between the pages.

Thirdly, that would be a very poor practice. Move the script off-page into a .js file and load it into the pages where it is needed.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic