Exemple #1
0
#frame1, #frame0 {
	background-color: #F7F7F7;
	margin: 30px auto auto;
	padding: 10px;
	width: 750px;
	border:1px solid #EEE;
}
</style>
<script type="text/javascript">
$(function(){	   


	$("#exportToExcel").click(function() {									   
		var data='<table>'+$("#ReportTable").html().replace(/<a\/?[^>]+>/gi, '')+'</table>';
		$('body').prepend("<form method='post' action='exporttoexcel.php' style='display:none' id='ReportTableData'><input type='text' name='tableData' value='"+data+"' ></form>");
		 $('#ReportTableData').submit().remove();
		 return false;
	});

});
</script>
</head>
<body>
<div id="frame1"> <a href="#" id="exportToExcel">Export To Export</a>
<?php 
$ro->inventoryListToExcel("medicine");
?>
</div>
</body>
</html>
#frame1, #frame0 {
	background-color: #F7F7F7;
	margin: 30px auto auto;
	padding: 10px;
	width: 750px;
	border:1px solid #EEE;
}
</style>
<script type="text/javascript">
$(function(){	   


	$("#exportToExcel").click(function() {									   
		var data='<table>'+$("#ReportTable").html().replace(/<a\/?[^>]+>/gi, '')+'</table>';
		$('body').prepend("<form method='post' action='exporttoexcel.php' style='display:none' id='ReportTableData'><input type='text' name='tableData' value='"+data+"' ></form>");
		 $('#ReportTableData').submit().remove();
		 return false;
	});

});
</script>
</head>
<body>
<div id="frame1"> <a href="#" id="exportToExcel">Export To Export</a>
<?php 
$ro->inventoryListToExcel("supplies");
?>
</div>
</body>
</html>