aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Closing window aftre submitting form Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Closing window aftre submitting form" Watch "Closing window aftre submitting form" New topic
Author

Closing window aftre submitting form

ravindra patil
Ranch Hand

Joined: Sep 01, 2006
Posts: 214
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

Joined: Nov 08, 2001
Posts: 15376
    
    6
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

Joined: Sep 01, 2006
Posts: 214
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

Joined: Jan 10, 2002
Posts: 60049
    
  65

A new page will load.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
praveen kumarmindi
Greenhorn

Joined: Jul 23, 2011
Posts: 1
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

Joined: Jan 10, 2002
Posts: 60049
    
  65

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.

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Closing window aftre submitting form
 
Similar Threads
How To Close Parent Window?
Closing a window without prompt
window.open() problem
Closing window
closing Modal dialog box