i've looked , don't see way disable page, overlay on page prevent action when have javascript submit action:
function agendaminutes() { var id = '@model.id'; var form = $('<form method="post" action="agendaminutes">'); form.append($('<input type="hidden" name="dprid" value="' + id + '">')); $(body).append(form); form.submit().remove(); return false; }
this works charm in generating , sending pdf client, allows user click button more once. disable button how know when pdf has been returned can release it?
but how know when pdf has been returned [so can re-enable page]
the simplest option downloading file , "knowing" when complete send file new window/tab via target="_blank"
.
this way, user gets progress indicator (via browser) , page doesn't need know when it's completed (as other tab handles it) can be re-enabled immediately.
if page needs wait reason, eg document must generated before continuing, alternative solution require: in case, i'd generate and persist file on server, provide download link client.
Comments
Post a Comment