Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function SendToExcel() {
- $.ajax({
- type: "GET",
- url: "/Search.aspx",
- contentType: "application/vnd.ms-excel",
- dataType: "text",
- data: "{id: '" + "asdf" + "'}",
- success: function(data) {
- alert(data);
- },
- error: function (XMLHttpRequest, textStatus, errorThrown) {
- alert(XMLHttpRequest.responseText);
- }});
- }
- function SendToExcel() {
- var dataString = 'type=excel' +
- '&Number=' + $('#txtNumber').val() +
- '&Reference=' + $('#txtReference').val()
- $("#sltCTPick option").each(function (i) {
- dataString = dataString + '&Columns=' + this.value;
- });
- top.iExcelHelper.location.href = "/Reports/JobSearchResults.aspx?" + dataString;;
- }
- function exportExcel(){
- var inputs = $("#myForm").serialize();
- var url = '/ajaxresponse.php?select=exportExcel&'+inputs;
- location.href = url;
- }
- case 'exportExcel':{
- ob_end_clean();
- header("Content-type: application/vnd.ms-excel");
- header("Content-Disposition: attachment;
- filename=exportFile.xls");
- echo $html->List($bd->ResultSet($_GET));
- }
Add Comment
Please, Sign In to add comment