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 Can Javascript variable store into JSP variable 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 "Can Javascript variable store into JSP variable" Watch "Can Javascript variable store into JSP variable" New topic
Author

Can Javascript variable store into JSP variable

Chua Keng Guan
Greenhorn

Joined: Oct 11, 2006
Posts: 10
is it possible to put Javascript variable into JSP variable?
Jeffrey Hunter
Ranch Hand

Joined: Apr 16, 2004
Posts: 305
No, this is a frequent misconception and I had wondered the same thing back when I first started with jsp. Simply put, javascript is a client-side technology, so it executes on the client machine, while jsp is server-side, and executes on the server. So you see, there is no way to bridge the divide between javascript and jsp unless you make a trip to the server.

Cannot do this:



You can do this:

[ November 20, 2006: Message edited by: Jeffrey Hunter ]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60783
    
  65

Perhaps this article might be helpful.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Can Javascript variable store into JSP variable
 
Similar Threads
send variable
Accessing javascript variable in jsp
Javascript => JSP
assign return value of function from javascript to variable in jsp
JSP, JavaBean Coding with JavaScript