This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
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 OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA 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: 61103
    
  66

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: 61103
    
  66

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