Ajax and Download

a place to get help

Moderator: 1.1 Moderators

Ajax and Download

Postby Adaron on Fri Jul 03, 2009 6:07 pm

Hi guys,
sorry for my bad english.

I'm writing a code that send some informations to a PHP script. Basically this script made a MYSQL database dump and then export it to XLS format.
If I reach the PHP script directly, the OPEN/SAVE box correctly appear and I can open or save the generated XSL file, but if I start te request trough Mootools Ajax, nothing happens.

that's my code:
  1. $('export_table').addEvent('click', function(){
  2.      var query = $('actual_query').innerHTML;
  3.      if(query=='') {
  4.           alert('Nessuna tabella caricata');
  5.           return;
  6.      }
  7.      var ajaxExport = new Ajax('__export.php', {
  8.           data: {'q': query}
  9.      });
  10.      ajaxExport.request();
  11. });


thanks
Adaron
 
Posts: 1
Joined: Fri Jul 03, 2009 6:03 pm

Return to Help

Who is online

Users browsing this forum: No registered users and 1 guest