• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

Displaying an alert dialog after completing a server side Activity

 
Ranch Hand
Posts: 528
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am not sure to post this in JavaScript forum / JSP forum . so my appolizes


How to display an alert Message after the download is complete as most of the sites do??

 
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think no one does it.When you click download button in UI it wil go as one request and request will be completed when response is commotted.You cant send the response back to your UI after that.
 
RaviNada Kiran
Ranch Hand
Posts: 528
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Surya , you might have noticed after the download completes it either makes some sort of sound . (This is contrast from your browser may be javascript)
 
RaviNada Kiran
Ranch Hand
Posts: 528
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Found an answer with AJAX :


 
Ranch Hand
Posts: 608
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

RaviNada Kiran wrote:Surya , you might have noticed after the download completes it either makes some sort of sound . (This is contrast from your browser may be javascript)



typical download are completely controlled by the browser with very little control in code. The sound that you hear is made by the browser - no JavaScript/JSP is involved. Unless you are completely streaming the download I not sure if you can find out if its complete or not.

Yes Ajax is a pretty neat technology but how do you find out if the download is complete or not using Ajax? Unless you mean to say that your Servlet/JSP is streaming the data to the user?
 
RaviNada Kiran
Ranch Hand
Posts: 528
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sam , a valid point .

After checking no bytes left to write on to the InputStream on to the servlet , then send some signal to the javascript. Anyway i will make this anyhow.
 
Good night. Drive safely. Here's a tiny ad for the road:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic