jQWidgets Forums
Forum Replies Created
-
Author
-
March 28, 2014 at 8:01 am in reply to: Export Csv without internet connection Export Csv without internet connection #52122
Thanks peter.
March 28, 2014 at 7:45 am in reply to: Export Csv without internet connection Export Csv without internet connection #52120Hi peter,
I save it in a variable and since im trying to export csv without internet i use jquery DATA URI to download the csv file. but it only works in FF and chrome. Did jqwidgets have this same code functionality that is compatible with IE, FF and chrome? or related codes that download the csv file without internet connection.
This is my sample code of jquery Data URI to download csv file without internet connection.
function exportCSV(product, feature) {
var usageGrid = $j(‘#’ + toSafeName(product + ‘_-‘ + feature));
var exportFile = usageGrid.jqxGrid(‘exportdata’, ‘csv’);
exportCSVReport.apply(exportFile, [exportFile, usageGrid.attr(‘id’) + ‘.csv’]);
}function exportCSVReport(csv, filename) {
var csvData = ‘data:application/csv;charset=utf-8,’ + encodeURIComponent(csv);
$j(‘.feature-report-csv’).attr({
‘download’: filename,
‘href’: csvData,
‘target’: ‘_blank’
});}
Thanks!,
Best Regards.March 23, 2014 at 1:30 pm in reply to: Export Csv without internet connection Export Csv without internet connection #51658Thanks Peter.
I copy the save-file.php but an error appears on my browser says that,
“The HTTP verb POST used to access path ‘/jqwidgets/save-file.php’ is not allowed.”this is my code in exporting CSV
function exportCSV(product, feature) {
var usageGrid = $j(‘#’ + toSafeName(product + ‘_-‘ + feature));
usageGrid.jqxGrid(‘exportdata’, ‘csv’, usageGrid.attr(‘id’), true, null, true, ‘/jqwidgets/save-file.php’);
}need help.
thanks,
Regards.Thank you Dimitar.
-
AuthorPosts