Win a copy of Microservices Testing (Live Project) this week in the Spring forum!
  • 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 ...
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

Getting form values from Pop up and processing them in Parent

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

I have an application where I have to show a pop up on click of a button and the values user enter in the pop-up are to be processed backend and written to database. Immediately, I need to refresh the parent where that information written by pop-up has to be read from databse and displayed.

When I did all this in pop-up itself (I mean, I called submit on pop-up, then opener.document.reload() and then window.close() all on the click of save button in the pop-up javascript) , I got deadlock or timeout exception on database because the pop-up and parent were both trying to access the data at same time...

Things work fine if I give setTimeOut of atleast 100ms on the call to opener.document.reload(), but I don't want to take a risk because I'm not sure about the backend process time.

Hence I want to accomplish this by passing the form fields of pop-up onto the parent and closing the pop-up then itself and soon after, processing those form values and updating on databse and refreshing the parent page from parent itself.

I'm not getting the way to know in the parent that the pop-up is closed so that processing can be started immediately. Could anybody help me on this?

    Bookmark Topic Watch Topic
  • New Topic