aspose file tools*
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
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: 61766
    
  67

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: 61766
    
  67

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to call javascript function of another jsp from one jsp