Cannot get output-widget to work on website #681

PlasticKnife opened this Issue Jul 11, 2014 · 2 comments


None yet
2 participants


I created this fiddle by combining your columnSelector-widget demo and your output-widget demo.

The fiddle works as expected, but whenever I try to run this in my website it does not work.

Even though I have modified the .htaccess file to include this as you explain in the widget-output demo:

<FilesMatch "\.(?i:csv|txt)$">`
    ForceType application/octet-stream`
    Header set Content-Disposition attachment`

The Get CSV button just reloads the page but it does not open the popup or download the file.

When i click the Get CSV button I get this error:

Uncaught TypeError: cannot read property 'widgetOptions' of undefined

I think I am missing something on the php side but I am not sure what.


Mottie commented Jul 11, 2014

Hi @hungryforsuccess!

Can you share an example of your javascript? The demo seems to be working fine, aside from not applying a file name or extension.

Anyway, I think I might have found an alternate method that will allow downloading a file with file name & extension without requiring any server-side modification. I am having some trouble with how IE deals with the code, but once I get around that issue, I'll include the change in the next update.

@Mottie Mottie added Widget and removed How To... labels Jul 11, 2014


I figured out the solution to my problem. The page I was trying to set this up contained other tables besides the table with the tablesorter class. So in the download function, I just had to specify the table with the tablesorter class as such:

var $table = $('table.tablesorter'); // instead of $table = $('table');
$('.download').click(function () 
   var delivery = $('option[name=delivery]:selected').attr('data-delivery');
   $'tablesorter').widgetOptions.output_delivery = delivery;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment