[Phpmyadmin-devel] Bug with properties system

Rouslan Placella rouslan at placella.com
Tue Aug 14 10:21:49 CEST 2012

On 13/08/2012 16:09, Alex Marin wrote:
> Rouslan, I have a quick question:
> For exporting a database, in db_export.php there is this code:
> $response = PMA_Response::getInstance();
> $header   = $response->getHeader();
> $scripts  = $header->getScripts();
> $scripts->addFile('export.js');
> [..]
> And in js/export.js, the functions are called with the .ready() handler. F.e.:
> $(function() {
>      toggle_save_to_file();
>      $("input[type='radio'][name='output_format']").change(toggle_save_to_file);
> });
> I've noticed that none of the functions in js/export.js are triggered and
> deleting the whole content of the file actually leads to the same behavior
> of db_export.php (or tbl_export.php or server_export.php).
> But if you insert an alert without the $(function() {}); handler, it
> will pop-up.
> Is it possible that this is related to the way the script is included via the
> addFile() method in the PMA_Scripts class?

No, nothing to do with the PMA_Scripts class. BTW, in current master for 
me all of the document-ready handlers are triggered correctly on all 
export pages (putting in an `alert(1)` shows a popup as expected).
Tested in Firefox 14.0.1 and Chrome 18.0


More information about the Developers mailing list