I'm using the tablesorter fork from Mottie. I am not very experienced with javascript, but so far I got everything to work. Here is the problem:
NOW I want to have two buttons above my table to allow the download of either all rows or download just the selected rows.

For this I have the following javascript code which works partly. I just need to get it to work to download all(!) rows.

What I am doing wrong ?

Here is the portion which outputs all:

```
$('.downloadall').click(function(){
    var $table = $('.tablesorter');
    wo = $table[0].config.widgetOptions,
    saved = $table.find('.output-filter-all :checked').attr('class');
    wo.output_includeHTML  = false;
    wo.output_delivery = 'p';
    // d = download p = page
    wo.output_saveRows ='a';
    // a = all f=filtered
    $table.trigger('outputTable');
    return false;
});

```

This works very well including the setting of all the other output options.
The following code does exactly the same thing, but I want, of course, just the selected rows.

```
$('.downloadselected').click(function(){
    var $table = $('.tablesorter');
    wo = $table[0].config.widgetOptions,
    saved = $table.find('.output-filter-all :checked').attr('class');
    wo.output_includeHTML  = false;
    wo.output_delivery = 'p';
    // d = download p = page
    wo.output_saveRows = saved;
    // a = all f=filtered
    $table.trigger('outputTable');
    return false;
});

```

I've tried various things but with no luck.