adding the javascript for the export