Hi,

Thanks but I have already tried this solution. I didn't get file
downloaded on client machine.

I have following code at client side. Is any thing lacking there? I am
using AJAX here in extjs.


function downloadFile(){
    var url='/download_key';

    var ajaxReq=ajaxRequest(url,0,"GET",true);
    ajaxReq.request({
        success: function(xhr) {
            //Ext.MessageBox.alert(_("Success"), response);
        },
        failure: function(xhr){
            Ext.MessageBox.alert( _("Failure") , xhr.statusText);
        }
    });
}


Regards,
Sandeep


On Tue, 2011-02-22 at 13:28 +0530, Graham Higgins wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi,
> 
> On 22 Feb 2011, at 07:01, Sandeep wrote:
> 
> > I have some text content in database field. I want to download that
> > text content from database field on client machine.
> 
> http://stackoverflow.com/questions/790019/how-do-i-return-a-csv-from-a-pylons-app
> 
> shows how to do this for a .csv file.
> 
> > I want this text content in a file at client side.
> 
> 
> This isn't really related to Pylons, you just need to set the relevant
> HTTP response headers:
> 
> http://www.webmasterworld.com/forum88/12908.htm
> 
> 
> - --
> Cheers,
> 
> Graham
> 
> http://bel-epa.com/gjh/
> 
> 
> 
> 
> 
> 
> 
> 
> -----BEGIN PGP SIGNATURE-----
> 
> iEYEARECAAYFAk1jbJAACgkQOsmLt1Nhivzv/gCfUEtz6r6GeIb+kM+5s9XsUx9E
> 1nAAoNhiV5LKetd8RaUMd9mQZOxQExe3iQCVAgUBTWNskFnrWVZ7aXD1AQJcYQP9
> Ebu6uZNyQVpw9ZBB1M3i3laoaYrIN6vecg0DLV9h77Nzx+oGbQ/VntEG2If33j91
> jBgTScRn8ZTvfKagQUKW/kqjVNc3w9Kqo3e+iSPaV/zE3PmUPfSxJ9nhkTOgqbNH
> z18t54X8PeViAfMgvnhg9ntzWYGohW9tdNyHt/IxJ1U=
> =+FQx
> -----END PGP SIGNATURE-----
> 
> --
> You received this message because you are subscribed to the Google Groups 
> "pylons-discuss" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/pylons-discuss?hl=en.
> 

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.

Reply via email to