• Post Reply Bookmark Topic Watch Topic
  • New Topic

Getting form values from Pop up and processing them in Parent  RSS feed

Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • 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?

With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!