This week's book giveaway is in the JavaFX forum.
We're giving away four copies of Introducing JavaFX 8 Programming and have Herbert Schildt on-line!
See this thread for details.
The moose likes JSP and the fly likes JSP work with Javascript (Pain!) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Introducing JavaFX 8 Programming this week in the JavaFX forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "JSP work with Javascript (Pain!)" Watch "JSP work with Javascript (Pain!)" New topic

JSP work with Javascript (Pain!)

Peter Pu

Joined: Apr 22, 2004
Posts: 2
as we all know, JSP is server page and Javascript is for client only.
but somehow I really need them to work together
the situation is I have a pop up window, and it will pass something back to the original window using javascript
and on the original window, I need to store that value in a bean, or a variable on JSP (java variable)
and body know how to do this?
maybe with cookie?..or?
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63331

The only way to get Javascript to communicate back to the server is to post a request. Your popup can do this in a hidden frame, or to itself before closing.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Peter Pu

Joined: Apr 22, 2004
Posts: 2
ok, thanks!
I will try it
I agree. Here's the link:
subject: JSP work with Javascript (Pain!)
It's not a secret anymore!