Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

window.close not submitting properly

 
Karup Mew
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I have a popup window when I click submit button it automatically close the window and submit the parameters also.I use window.close method for this but sometimes it does not submit the parameters any solution for this .
 
Muhammad Saifuddin
Ranch Hand
Posts: 1324
Android Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can you please share your code snippet here..
 
Muhammad Saifuddin
Ranch Hand
Posts: 1324
Android Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
or you can use JavaScript debugger (firebug). this may help you to track your code by using break point.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you close the window, there is a chance that it will beat the form submission out. Only way to make sure that the form is submitted is to only close the window when the page comes back from the server.

Eric
 
Karup Mew
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Eric Pascarello:
If you close the window, there is a chance that it will beat the form submission out. Only way to make sure that the form is submitted is to only close the window when the page comes back from the server.

Eric


I am not closing the window. The scenario is when i clicked the submit button it submits the parameters and then it will close, but here sometimes it will close without submit the parameter values.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are not closing the window than how is it being closed. A submit button does not close a window.

Eric
 
Karup Mew
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when click the submit button the onclick calls windows.close method it closes the window but sometimes the input parameters are not sent to server side that's my problem
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64623
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Karup Mew:
when click the submit button the onclick calls windows.close method it closes the window but sometimes the input parameters are not sent to server side that's my problem

Then actually read Eric's first reply, which completely answers your question.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic