aspose file tools
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 Head First Android 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: 63026
    
  69

Perhaps this article might be helpful.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
jQuery in Action, 3rd edition
 
subject: Can Javascript variable store into JSP variable
 
It's not a secret anymore!