SOLVED! jQuery does not works when exporting html table to excel

Hello there!

I have HTML table that i want to export as excel , that works!

I needed to show total value of one column on top of the page (and it works on browser) i did it with jQuery.

Here is were i add total value:

echo '<p style="display:inline-block;" class="total-title"></p>';

Here is how i add value:

	function() {
		$('').html('&nbsp;total: <?=$total;?>');

And here are my headers:

header("Content-type: application/octet-stream");
header("Content-Disposition: attachment; filename=print_report(".date('Y-m-d').").xls");
header("Pragma: no-cache");
header("Expires: 0");
header('Content-Description: File Transfer');  
header("Content-type: application/");

All other data is exported but just this jQuery added content is not showing!

Why it works when i remove headers? And why could it not work in export?

What possible fixes are here?


I found solution for this :

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.