Jump to content


Exporting to Excel but staying on the page

  • Please log in to reply
1 reply to this topic

#1 johnska7

  • Members
  • PipPip
  • Member
  • 27 posts

Posted 23 October 2006 - 07:46 PM

Hey all,

I have a nice little script that exports the contents of my database to an excel file. I have everything working (even the headers so that it pops open a window for opening or saving the file) but what I'm left with is a blank white screen behind the window...the page is accessed via a link, not a form, and everything is done between my function file and the top of the page that does an include on the function file.

My question is, how can I make it so that the link that I click off of stay on the screen, or reload the screen, after clicking the link so that the people who are trying to get the excel file can still be in the regular area and not have to hit the back button.

#2 Barand

  • Moderators
  • Sen . ( ile || sei )
  • 18,019 posts

Posted 23 October 2006 - 09:54 PM

In a word, AJAX

page1 has a link or button, which when clicked, sends xmlhttp.request to your export script

Export runs and creates Excel file and sends completion message back.

page1 displays completion message.
If you are still using mysql_ functions, STOP! Use mysqli_ or PDO. The longer you leave it the more you will have to rewrite.

Donations gratefully received


|baaGrid| easy data tables - and more
|baaChart| easy line, column and pie charts

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users