I have code that generates a file for download. I want to close the window after the user selects the download or even redirect them.
Here is my code: response = HttpResponse(cal.as_string(), mimetype='text/calendar') response['Content-Disposition'] = 'attachment; filename=schedule.ics' return response I can't close the window before the download using <form method='post' onSubmit="close.window()"> .... </form> because I get an error that the window closed. So after the form download the window is hanging in limbo. If anyone knows how to close the window I'd appreciate it. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.