wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes How to share the data between two web pages ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "How to share the data between two web pages ?" Watch "How to share the data between two web pages ?" New topic
Author

How to share the data between two web pages ?

Ravi C Kota
Ranch Hand

Joined: Jan 29, 2008
Posts: 61


Hello All,

I'm working on a sample project, where in upon clicking a button or hyperlink, a popup window is opened and some values entered on that popup are required to be updated back on the original page. To put it simple,

for eg, If I click a button on page A, a popup page B. I entered some values on page B and it goes to server for some processing and the results are returned back. However, I need that response to be updated back on page A.

My gut feeling is it is NOT possible. However, since I saw similar prefill kind of applications in Banks, I'm thinking that it is possible but with some tweaks. How can this be done?

Does Spring provide any built in features for this kind of usecase?

For now, to mimic it, the server is rendering the page A after processing, so that way I see that PageA is displayed. But that PageA is not the same PageA originally the request is sent. I see both pages in separate browser windows...


or Am I sounding stupid ?

Thanks & Regards, Ravi C.Kota
SCJP 5.0, OCDJWS 5.0
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61106
    
  66

Ravi C Kota wrote:My gut feeling is it is NOT possible.

Of course it is. The child window has access to the parent via the opener JavaScript variable.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Ravi C Kota
Ranch Hand

Joined: Jan 29, 2008
Posts: 61
Thanks Bear,

Will do some research on "opener"
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61106
    
  66

In a child window, opener will refer to the window object of the window that created the page,
 
 
subject: How to share the data between two web pages ?