This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Assign javascript variable to a java variable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Assign javascript variable to a java variable" Watch "Assign javascript variable to a java variable" New topic
Author

Assign javascript variable to a java variable

chris gar
Ranch Hand

Joined: Jul 20, 2002
Posts: 45
How do I assign the value of a javascript var to a java String.

I've seen posts on how to do the opposite but not the way I need.

Thanks
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61456
    
  67

You don't. The only way to get Javascript data back to the server is to submit it via a request.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Assign javascript variable to a java variable