• Post Reply Bookmark Topic Watch Topic
  • New Topic

File download error in javascript  RSS feed

Vijay Chandran
Ranch Hand
Posts: 186
  • Mark post as helpful
  • send pies
  • 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?

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!