You can use jQuery.paramto convert the object to a query string.
var qs = {};
qs.cam = id;
qs.range = 'blah';
var query_string = jQuery.param(qs);
Or, in use :
$('a.csvBtn').attr('href', function(){
var qs = {cam : id, range : 'blah'};
return "CSVReporter?"+jQuery.param(qs);
});
Yahel source
share