• 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 ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

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
Hi,

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?


Thanks,
Bhavin
 
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.
 
The only cure for that is hours of television radiation. And this tiny ad:
New web page for Paul's Rocket Mass Heaters movies
https://coderanch.com/t/785239/web-page-Paul-Rocket-Mass
reply
    Bookmark Topic Watch Topic
  • New Topic