aspose file tools*
The moose likes JSP and the fly likes Get Javascript returned value into Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Get Javascript returned value into Java" Watch "Get Javascript returned value into Java" New topic
Author

Get Javascript returned value into Java

lucas teh
Greenhorn

Joined: Jun 29, 2010
Posts: 6

As per case above, how can I assign aaa to the return value of func1 ("bbb") i.e. aaa = "bbb"?
Naresh Shanmugam
Ranch Hand

Joined: Jul 16, 2010
Posts: 84
Lucas Javascript executes on Client side(Browser), Where as the Java code executes on the Server side.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60053
    
  65

You can't. You have a fundamental misunderstanding of how JSP works. Please read this article to understand how JSP operates, and why this is impossible.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60053
    
  65

Also, modern JSP should have no Java code embedded within them. You should update your JSP knowledge.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Get Javascript returned value into Java
 
Similar Threads
Prompt algorithm
dumb question
System.properties()
print string with breaks on web page
Accessing the base class methods in child class.