Go Back   Novahq.net Forum > phphq.Net > phphq.Net Forums

Thread Tools Search this Thread Display Modes
Old 06-28-2011, 10:24 AM
alvidales is offline alvidales
Registered User

Join Date: Jun 2011
Posts: 1

Plain Trying to get php script to work with ajax(jquery)

Hi there, i'm new in this forum i'm wondering if is there anyone who could help me with this.

I'm trying in one php file to call from a button

<input type="button" onclick="javascript:exportexcel(<?=$month?>, <?=$year?>"/>
and the code for the js function is:

    function exportexcel(month, year){
            url: 'exportexcel.php',
            cache: false,
            contentType: "application/x-www-form-urlencoded",
            dataType: "html",
            success: function()
                    $('#msg').html('Sales report build succesfully');
                    $('#msg').css('display', 'inline-block');
            type: "POST",
if i uncomment the alert, it shows the alert window, but i can't make it to work, the file exportexcel.php generates data and exports it to excel, afterwards it sends prompt to user to save it or it just starts to download, is there any other way to make it work??, thx in advance.
Reply With Quote

ajax, excel, javascript, jquery, php

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
What PHP script is this? Chels Web design and Programming 11 02-04-2006 05:45 AM
my first php script.. General Nuisance Web design and Programming 32 05-31-2005 09:34 PM
PHP NEWS SCRIPT? o2 phphq.Net Forums 8 10-30-2004 02:57 PM
Php Database Script area51-(xs)- Web design and Programming 8 06-27-2003 09:24 AM
php news script? Se7eN Web design and Programming 2 05-04-2003 12:09 PM

All times are GMT -5. The time now is 10:23 AM.

Powered by vBulletin®