• Post Reply Bookmark Topic Watch Topic
  • New Topic

Displaying an alert dialog after completing a server side Activity  RSS feed

 
RaviNada Kiran
Ranch Hand
Posts: 528
  • Mark post as helpful
  • send pies
  • 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??

 
Surya Kant
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • Quote
  • Report post to moderator
Found an answer with AJAX :


 
Saifuddin Merchant
Ranch Hand
Posts: 607
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!