This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JSP and the fly likes How to access javascript variable of one file in another jsp file 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 » Java » JSP
Bookmark "How to access javascript variable of one file in another jsp file " Watch "How to access javascript variable of one file in another jsp file " New topic
Author

How to access javascript variable of one file in another jsp file

sumit kushwaha
Greenhorn

Joined: Nov 11, 2008
Posts: 3
I have 2 jsp files and both have some javascript code.
In one of the jsp file i have a javascript variable whose value i need to assign to another javascript variable in my other jsp file.

How can i do that??

Please let me know if its not clear!!!
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

JSP files, which reside and are interpreted on the server, have no relationship to one another as far as your client side (Javascript) code is concerned.

This article might help to clarify this for you.
http://www.javaranch.com/journal/200510/Journal200510.jsp#a1

If not, post back and let us know a little more about your JSP pages.
Is one included in the other? Are they in frames? How are loading both of them into the browser at the same time?
[ November 11, 2008: Message edited by: Ben Souther ]

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to access javascript variable of one file in another jsp file
 
Similar Threads
md5 jsp javascript
global variables in Javascript
moving variables from one page to an other
how can v pass javascript values to jsp
compare jsp variable and javascript variable