This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Closing window aftre submitting form

 
ravindra patil
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI ,
i have html form which takes inputs and submits the form .the action attribute hits the side and downloads the file

but i want to close the dialog on my submit function also
if i add window.close() window gets closed but file in not getting dowloaded. how can do this i want to close the window when my file gets downloaded

document.myform.submit();
window.close();

thanks
Ravi
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are not giving time for the next page to load. If you want it to close, it needs to be done with whatever is loading after the submit.

Eric
 
ravindra patil
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
but how can i tell that loading is done as if i submits the form there is no return value from submit function to know whether action is completed or not



 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65225
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A new page will load.
 
praveen kumarmindi
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
finally you guys gat the answer or not?
if you get the answer then post it i will be waiting 4 this answer please................
.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65225
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
praveen kumarmindi wrote:finally you guys gat the answer or not?
if you get the answer then post it i will be waiting 4 this answer please................
.

You will be waiting a long time as the question has already been answered.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic