Genereic Export Footer Function

Hi

I try to write a generic method who adds export links in the footer.
Here the code I wrote but, as you can read, something is missing (???)

May someone help me to complete this code a/o found another way to build this function ?

Thx a lot.

J.

	dhtmlXGridObject.prototype.ajoute_export = function() {
		var txt_arr = new Array('Export <a class=\'titleBleu\' href=\'javascript:void(0)\' onclick=\'????????.toPDF("/class/dhtmlx/generate_pdf.php");\'>PDF</a> / <a class=\'titleBleu\' href=\'javascript:void(0)\' onclick=\'????????.toExcel("/class/dhtmlx/generate_xls.php");\'>Excel</a>');	
		for(var i=0, nb_col = this.getColumnsNum() - 1; i<nb_col; i++)
			txt_arr.push('#cspan');
		this.attachFooter(txt_arr.join(','), ['text-align:left']);
		this.setSizes();
	}

One of possible approaches is the next

dhtmlXGridObject.prototype.ajoute_export = function() { var uid = "grid_"+this.uid(); window[uid] = this; ... onclick=\'"+uid+".toPDF("/class/dhtmlx/generate_pdf.php");\

Stanislav, you’re the best !
It works perfectly. Thanks a lot !