I know similar type of questions have been asked before, but I believe this one has some variance.
My web page has an Iframe
. This iframe loads the page from some other domain (cross domain scripting is in action). Now when I click a button in this iframe, it makes an AJAX
request through jQuery
and creates a text file on the PHP
server. 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.
Is there any workaround for this?
Thanks.