[Phpmyadmin-devel] Ajaxify Table-> Browse->Multiple rows->Export
Marc Delisle
marc at infomarc.info
Sat Jul 2 22:44:16 CEST 2011
Le 2011-07-02 14:59, Thilanka Kaushalya a écrit :
> Hi Marc,
>
> I went through my previous modification for ajaxijfy the multiple row ->
> export option.
> In that I have a post in "*$("#buttonGo.ajax").live('click')*" action
> and it post the form to the export.php file. After that the export.php
> file send the response header with the correct parameters which are.
>
> Ex : when we select sql as the export type
> Content-Disposition:
> attachment; filename="jfakjalfa.sql"
> Content-Type:
> text/x-sql
>
>
> and the content of the jfakjalfa.sql file is returned correctly as
> xmlhttprequest.responseText. But the problem is javascript does not
> saves the content to the file. I went through some of the discussions
> which explains this kind of scenarios[1] and one of it suggest a jquery
> plugin as a solution[2].
>
> Can you explain me how I can cope up with this problem. Thank you.
>
> [1] -
> http://stackoverflow.com/questions/2186562/post-to-server-receive-pdf-deliver-to-user-w-jquery
> [2] -
> http://www.filamentgroup.com/lab/jquery_plugin_for_requesting_ajax_like_file_downloads/
>
> Regards,
> Thilanka.
Thilanka,
I quickly read these posts. As I understand, downloading a file is not
supported by Ajax. In order to avoid adding complexity to this part of
the code, I suggest to just abandon this feature; remove the code you
had started for this.
I encourage you to update this page:
http://wiki.phpmyadmin.net/pma/AJAXify_Interface
by documenting the parts you Ajaxify; then add your findings about
Export and Ajax downloading in the page, to guide future developers.
--
Marc Delisle
http://infomarc.info
More information about the Developers
mailing list