Dammit, man. I’ve been chasing this one all day long. getRowData not working with jQuery 1.3.1 or 1.3.2. I had to revert to 1.2.6. Is anyone else still having this problem?
I can export data to an excel file in FF/Chrome, but not IE7. After going to 1.2.6, I can export in IE.
function export_data()
{
var mya=new Array();
mya=$(“#list”).getDataIDs(); // Get All IDs
var data=$(“#list”).getRowData(mya[0]); // Get First row to get the labels (jquery 1.3.1 & 1.3.2 NOT WORK HERE. had to use 1.2.6)
var colNames=new Array();
var x=0;
for (var i in data){colNames[x++]=i;} // capture col names
// var html=””;
var html=”<%=xls_header%>“+”\n”; // add header row
html=html.replace(/,/g,”\t”); // tab-delimit header row
for(var r=0;r
data=$(“#list”).getRowData(mya[r]); // get each row
for(j=0;j
html=html+data[colNames[j]]+”\t”; // output each column as tab delimited
}
html=html+”\n”; // output each row with end of line
}
html=html+”\n”; // end of line at the end
document.export_map.csvBuffer.value=html;
document.export_map.method=’POST’;
document.export_map.action=’../Reports/ExportCategoryMaps.asp’; // send it to server which will open this contents in excel file
document.export_map.target=’_self’;
document.export_map.submit();
}
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top