• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Get Javascript returned value into Java

 
lucas teh
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

As per case above, how can I assign aaa to the return value of func1 ("bbb") i.e. aaa = "bbb"?
 
Naresh Shanmugam
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Lucas Javascript executes on Client side(Browser), Where as the Java code executes on the Server side.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64720
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64720
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also, modern JSP should have no Java code embedded within them. You should update your JSP knowledge.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic