• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

data submit on popup and refresh parent page

Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I want to submit data on popup, save it, close popup and show the saved data on parent page. I am using struts 1.3 environment. I tried using following ways:

1) Using Javascript, I submitted form data from popup and reloading parent page. This reloads parent page but it seems that it does not give surity of processing transaction successful. Any idea whether this approach is appropriate?

2) Using Struts, end of the "saveAction" of popup, I am forwarding it to "editAction" of parent page with expectation to bring the data and show it on the parent page. But this does not work. Any idea how it works in Struts?

Ranch Hand
Posts: 349
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I usually use option 1, but inorder to make sure that pop up window saves correctly I don't close it until after the application server returns a response to the pop up window indicating that the save was successful. I do this through an onload event in the body tag.

I use javascript to repopulate the parent page but relying on js always makes me a little uneasy since you lose some control by letting it process on the client side. You may be able to reduce the amount of js you use by having the parent submit its form when the user returns from the popup and then doing your look ups on the application server where you have more control (my mother in law says I have control issues, maybe she's right). The reason I don't usually do this is for performance, its less processing on the part of the applicaiton server.
His brain is the size of a cherry pit! About the size of this ad:
Free, earth friendly heat - from the CodeRanch trailboss
    Bookmark Topic Watch Topic
  • New Topic