tablesorter

use select tags with table sorter plug in and have it default to a given value

你说的曾经没有我的故事 提交于 2019-12-11 18:56:40
问题 I have a table that has drop down boxes to allow the user to select different options. I need to show what the default selection is when the table is loaded. Here is my code so far: //get info for defect dropdown var myselectoptions = ''; for(y=0;y<data.defect2.length; y++) { defect2 = data.defect2[y]; defect3 = defect2.substring(0,30); myselectoptions += '<option value="'+data.defect_id[y]+'">'+defect3+'</option>'; } if(data.isbn2 === null){ $("#inventoryUpdate").append('<tr><td>No Records

tablesorter.js and tablesortermin.js issues?

為{幸葍}努か 提交于 2019-12-11 18:38:43
问题 I am using the below tablesorter js files. https://github.com/Mottie/tablesorter/tree/master/js In that tablesorter.js files not showing the sorter images when i am applying like the below. <style type="text/css"> table.tablesorter thead tr .header { background-image: url('/Public/images/sorter/bg.gif'); background-repeat: no-repeat; background-position: center right; cursor: pointer; } table.tablesorter thead tr .headerSortUp { background-image: url('/Public/images/sorter/asc.gif'); } table

AJAX appended collapsible rows to a jQuery/javascript Tablesorter table lack needed attributes

[亡魂溺海] 提交于 2019-12-11 13:10:34
问题 I'm trying to append rows upon scrolling of a table using a modified version of Tablesorter.js: http://www.pengoworks.com/workshop/jquery/tablesorter/tablesorter.htm. It is modified in the sense that it allows for collapsible rows. The problem I'm having is that upon scrolling and an AJAX call to load new rows, these new rows are lacking the attributes of the other rows that allow them to be toggleably collapsed/expanded. Here's some issues with the HTML for these appended rows: the clickable

cell computation for tablesorter

核能气质少年 提交于 2019-12-11 13:02:00
问题 I would like to compute the values in a number of cells, that get updated as one moves a slider bar in a different part of the table. I currently am storing the value after it is defined, but it needs to be updated. I've tried defining something like this: onchange="myFunction()" where myFunction would redefine the variable, but that did not work. I think that the solution is to insert something under the initialized: function (table) area of the code for a dynamic update (which I'm not sure

Mysql PHP generated table: doesn't work with Tablesorter

社会主义新天地 提交于 2019-12-11 12:20:46
问题 I found this great Tablesorter plugin for jQuery but I can't make it work with my PHP generated table. Here's the code: <script type="text/javascript"> function table() { $("#container").load("table.php?randval="+Math.random()); } $(document).ready(function() { table(); $("table").tablesorter(); }); </script> Where #container is the div where the table will be and table is the name of the table. I get the table loaded but sorting function is not working. It works if I put the table directly

How to make TableSorter.js working with the table on demad via some JS and inc.php file

与世无争的帅哥 提交于 2019-12-11 12:07:39
问题 I have a table that I want to make sortable. The problem is that this table has been loaded from the external file (inc.php) via some JS (filter-data.js) function. To be more precisely, I have a main.php page with the Submit button. When I click on it, that triggers some JS code which calls inc.php file to populate my table with its data on demand from MySQL base and then puts them both (table + data) back to the main page: This is the table placeholder on the main page. <div id="tableData"><

jQuery Tablesorter dynamically load CSV

主宰稳场 提交于 2019-12-11 11:59:37
问题 Okay this is driving me crazy. I've got a csv file that I am loading dynamically to an html table with CSVToTable and then sorting it with Tablesorter. The issue I am running into is when I attempt to apply Tablesorter widgets like "filter" they will not apply. But when I copy the dynamically loaded html table and copy and paste them into my source code they run without a problem. Can someone please explain to me why this is happening and how I can dynamically load my CSV file and apply

Complex Table Sorting

孤人 提交于 2019-12-11 11:49:46
问题 We track project progression in a single database. Over the last two years, the requirements of management have changed the format of which we store dates (originally, just the year, then year month, now full dates). To ensure there were no complaints from the database, the previous administrator set-up the table to store the dates in varchar instead of date . I've created a web-interface for users to access and generate reports, but the webpage is static (user-side). Management wants to be

TableSorter - External Search, Trying to search from button to filter all, not just column

烂漫一生 提交于 2019-12-11 10:39:57
问题 Forgive me, I'm a novice...I'm using TableSorter jQuery plugin. I have the external search box working which searches all columns. I also have buttons that will load a specific term, however these only work by filtering a certain column. I am trying to have these filter by all columns to no avail. Please help. See how I have my script set-up. <script> $(document).ready(function() { $("#myTable1").tablesorter({ sortList: [[0,0]], widgets: ["zebra", "filter"], // change the default striping

Tablesorter ordering dates and empty dates incorrectly

萝らか妹 提交于 2019-12-11 10:04:10
问题 My tablesorter table is not sorting dates and empty fields correctly. I would expect empty fields to be treated like zeros, and be grouped at the top/bottom. Instead I get some dates beneath them. $('table').tablesorter({ widthFixed: true, // sort on the last name in ascending order sortList: [ [2, 0] ], dateFormat: "ddmmyyyy", emptyTo: "zero", sortInitialOrder: "desc", headers: { 3: { sorter: "shortDate" }, 4: { sorter: "shortDate" }, 5: { sorter: "shortDate" }, 6: { sorter: "shortDate" } },