Reputation: 494
Spent quite some time on this forum looking at answers similar to my problem but couldn't find the one that matched my case.
I have an HTML form that I am submitting via javascript to my aspx page.
function Submit()
{
document.MyFormName.action = 'StreamPDF.aspx'
document.MyFormName.submit();
}
The StreamPDF.aspx returns application/pdf which presents the user with the open/save dialog. The PDF generation takes quite a while and the user needs to be presented with the 'wait' cursor. This is a simple aspx page (No MVC, no other plugins).
So my only option is to use javascript to post the data.The closest answer was this. I took the idea from this link and just before I submit the iframe, I am setting the wait cursor. But I have no way of knowing whether the PDF came back since I can't have cookies sent to the browser. It's my limitation. So I am still at square 1. Any help would be greatly appreciated.
Upvotes: 0
Views: 1255
Reputation: 494
After several attempts to get this working, I realized that the only non-intrusive approach to fix this is the suggestion in the link I posted. Have the server notify the client that the file is streamed by setting a cookie which is deleted by the client script.
Thanks for all your responses.
Upvotes: 0
Reputation: 398
can you give a try with blockui
http://forums.asp.net/p/1620326/4457438.aspx/1?Re+Show+wait+message+on+submit
Upvotes: 2