Meaningless Drivel is fun!*
The moose likes HTML, CSS and JavaScript and the fly likes how to call javascript function of another jsp from one jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "how to call javascript function of another jsp from one jsp" Watch "how to call javascript function of another jsp from one jsp" New topic
Author

how to call javascript function of another jsp from one jsp

Rohit Kumar
Ranch Hand

Joined: Sep 20, 2007
Posts: 53
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

Joined: Jan 10, 2002
Posts: 60810
    
  65

Firstly, this has nothing to do with JSP, so it's been moved to a more appropriate forum.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60810
    
  65

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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: how to call javascript function of another jsp from one jsp
 
Similar Threads
jsp and javascript
How can i call jsp from javascript
Calling JSP method from within a javascript function?
Need help on calling javascript without any handler from JSP..
calling a servlet from javascript function??