I have a controller action that builds a pdf and than downloads it by user.
It works great, but it takes a few seconds.
I would like to have a download Landing view display saying something like “working on your document…please wait”. We fiddled with some scripts like .blockUI(), but it’s not what the bosses want.
So I’ve got a landing page that works just fine, but if I try to run
@Html.Action("SlowAction", "Controller", routeVals)
the view doesn’t display until the "SlowAction" has completed. Which pretty much wipes out the purpose of the landing page.
Essentially I want the Landing view to render THEN call the "SlowAction" controller action. Perhaps some script that will count to 10 Mississippi then call the action? Sadly I know very little about java/ajax scripts.
Take a look at the ajax documentation for ajax located here http://api.jquery.com/jQuery.ajax/