• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

File download error in javascript

 
Ranch Hand
Posts: 186
Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear Friends,

I am trying to write a file download app. The file to be downloaded is a plain text file. I'm using the following JavaScript function, which will hit the server and get the file content.

A new window is opened but when i'm getting an error response like this:

Internet explorer cannot download somefile from localhost.



I'm setting the following headers in the HTTP response at the server side:


My browser version is IE 8. This is working in latest version of chrome.

Please help in resolving the issue. Also, how to get Open/Save/Cancel dialog box when window.open is triggered and the response is obtained from the server?

Thanks,
Vijay
 
reply
    Bookmark Topic Watch Topic
  • New Topic