Download file dialog jquery






















Without getting the server involved, it can be very difficult too get a browser to download a file. Each browser had different problems. Leave a comment on jakecigar's reply. Change topic type Cancel. Link this topic. Provide the permalink of a topic that is related to this topic. Save Close. Reply to venkatzeus's question. Top Reply. Statistics 1 Replies Views 1 Followers. Tags No tags available for this topic. Doesn't really change the fact of my answer, which is the the browser dictates what to do with downloaded files, not any JS code.

ScottMarcus you are right, but the point is not the dialog per se. I just used this to explain the fact that I want the file to be downloaded and not opened in the browser. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password.

Post as a guest Name. Email Required, but never shown. The Overflow Blog. Podcast what if you could invest in your favorite developer? Who owns this outage? Building intelligent escalation chains for modern SRE. Featured on Meta. Very easy to setup with nice visuals jQuery UI Dialog, but not required , everything is tested too. User never leaves the same page they initiated a file download from. This feature is becoming crucial for modern web applications. In conjunction with jQuery UI a developer can easily show a modal telling the user that a file download is occurring, disband the modal after the download starts or even inform the user in a friendly manner that an error has occurred.

My web page has an Iframe. This iframe loads the page from some other domain cross domain scripting is in action. Now I want that a normal 'Save as' dialog box should appear so that I user can download that file from the server. I have tried all the Content-Disposition and header function in PHP side but the 'Save as' dialog does not appear although the file is created successfully on the server.

I think, the problem is that I want to trigger the file download from the iframe which is loading content from some other domain.

I found a solution myself. Following jQuery code should be written in the iframe. It triggers the download through iframe instead of making an AJAX request to the server. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams?



0コメント

  • 1000 / 1000