JQuery :: Tables Sort/filter In Excel Style?
Sep 9, 2011I must insert in my standard html tables, the possibility to sort/filter columns.... in excel style, like this.There is a plugin that allows you to make this thing?
View 3 RepliesI must insert in my standard html tables, the possibility to sort/filter columns.... in excel style, like this.There is a plugin that allows you to make this thing?
View 3 RepliesI am using the excellent jquery.tablesorter successfully for a large number of 40-row tables that live together on one page. So far I'm very happy with the plugin. My users also need the ability to apply any column sort they invoke automatically to *all* tables on the pae. They do not wish to sort the tables individually. As recommended in another thread, I have been looking at sortStart and sortEnd, but have been pulling my hair out trying to get this working. My JS:
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
// extend the default setting to always sort on the first column
$.tablesorter.defaults.sortList = [[0,0]];
[Code].....
An existing JSP is generating the HTML page and table. I have retro-fitted it so that it adds to each input field a 'trigger' to the onkeyup event.
The purpose of this trigger is check for the the cursor keys being pressed (UP, DOWN, LEFT, RIGHT) and then if it is a logically valid move, shift to the next cell in that direction.
Now, the function it calls, doOnKeyUp, for the most part is working fine... when the input field in the table cells are a textbox or textarea, my method can re-focus the fields appropriately.
HOWEVER, I am having a huge headache when the input field is a combo box. Basically, the value of the combo box is changed with the cursor keys (which is default combo box behaviour (I think)), instead of moving to the next editable cell in that chosen direction.
Problem #1: My question: Is there a way to intercept/override the various onKey events or similar for the combo boxes. For the combo boxes, I want to continue to move between table cells UNLESS a do something specific, like press the spacebar to entire an update/modification mode for the current cell. Everything I have done so far does not prevent the combo box events from triggering.
Problem #2: Also, I tried a nasty hack to try and get it to work, by trying to switch the combo box's value back 1 spot (if it appeared to be needed) by changing the <combo box>.selected value. However, that change never appears to be taking hold, so it is staying at whatever the original selected value was. For this one, I am just curious as to the correct way to have javascript change the selected value in a combo box and make it "stick" and make it applied to the view/UI?
Code example:
You can probably tell by the code that I had been trying various things to change the combo box's selection via javascript, but none has worked for me.
I've successfully set up a table with toggling rows and alternate colour, and everything is working decently. Now, I've tried to do a further step by trying to style the parent row who do have child differently from those who don't, so that the user immediatly knows where clicking will bring result and where not. How can I do it? I've tried with the : parent selector but nothing, still keep looking all the same.
Here's my starting code:
<script type="text/javascript" src="../catalogo/js/jquery.js"></script>
<script type="text/javascript">
$(function() {
$('.parent')
.css("cursor","pointer")
.attr("title","Click to see")
.click(function(){
$(this).siblings('.child-'+this.id).toggle();
});
$('tr[@class^=child-]').hide();
});
</script>
<script type="text/javascript" src="../catalogo/js/jquery.js"></script>
<script type="text/javascript">
$(document).ready(function()
{ $(".parent:even").css("background-color", "#FFFFFF");
$(".parent:odd").css("background-color", "#F2F1ED");
$(".child:even").css("background-color", "#FFFFFF");
$(".child:odd").css("background-color", "#FAFAFA");
$("a").click(function(event){
$('.parent').unbind('click');
});
});
</script>
One more detail: I've got a dynamically generated table (from MySQL db) with more than 1000 rows.
Suppose that I have a table built like this:
var MyTable = new Array (
// english , italian ,Qty
["WaterMelon", "Anguria"],0,
[code]....
Now i'm building a page with a "SELECT" control for each entry in that table.Each SELECT changes the Qty value of the table.I need to show the table sorted alphabetically but depending on the choosen language the order will change, so i can't rely on the "index" of the changed control to find out what row in the table i need to modify.How can i sort that table and still have an association between the sorted indexes and the table original indexes?
I thought I'd try to begin with the accordion and tab, but I have had no success yet. I must be missing something simple. Here is the first test page:[code]Instead of getting tabs, I get my pages (generated by cgi perl scripts) displayed in tiny little scrollboxes at the top left.Equally bad, Firefox is telling me, in the error console, that jQuery.Tabs is undefined.FireFox doesn't like the filter and zoom properties in your style sheet.So, then, what do I need to do to get the tabs to work in the first instance. And then, how do I modify it to use an Accordion to display the same material. Are there any issues I need to be aware of when I start having my perl scripts (using predominantly the Perl packagesCGI and CGI::Session)create these pages?As far as possible, I am trying to keep this all valid HTML5, so that I can eventually make this interface mobile device friendly.
View 6 Replies View RelatedI found this script for free online that does a really basic fade in/fade out slide show. The problem is, it doesn't fade in Firefox! It looks beautiful in IE though (it seems like it's usually the other way around). I've posted the code below, how can I do the same exact thing cross-browser?
// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 5500;
// Duration of crossfade (seconds)
var crossFadeDuration = 3;
[code]...
I'm working with a style.filter related function.Some of my function appear as ...
Code:
document.getElementById('audio').style.filter = 'progid:DXImageTransform.Microsoft.gradient(startColorstr=#A8' + c.substring(1) + ',endColorstr=#A8' + c.substring(1) + ')';
Everything is working but I'm trying to replace the "A8" part with a percentage typed in by the viewer.The percentage is simply a non-decimal number between 0 and 100 typed into a box.I know how to grab the value of the box (again, it's 0-100) but how do I convert that number into it's "A8" equivalent?
Im opening an excel worksheet and adding data to it using Javascript ActiveX Excel Object as below
var Excel,Book;
Excel = new ActiveXObject("Excel.Application");
Book = Excel.Workbooks.Open("c:/example.xls");
var excel_sheet = Book.Worksheets("Sheet1");
[code]....
In the above code the column A in excel worksheet will have a unique value.I need to delete the entire row matching the value in column A and shift the rest of the rows up using this Javascript ActiveX Excel Object.
OK so Ive been using jquery for a little bit now and love it. I am a ColdFusion developer. I have a need where I would like to present the user with a list of categories and the user can drag and drop to sort, but then I need to post this new sort order to the database. So I see there are a ton of cool drag & drop plugins for jquery. I understand how they work and I can get it to work as far as spitting out DIVS or spitting out ULs that can be sorted, but then what? So now they are sorted on my screen and not really part of the form. How do I translate that into something I can do a post to the database with? Do I do an AJAX call every time they drop an item and try to extrapolate the sort order on that item after they drop it? Do I populate a hidden form field with the constantly updating sort order list? MAybe a list of ID's? How does everyone else go about this this task? I'm sure there is more than one way and I'm sure this is a common task.
View 1 Replies View RelatedI am having trouble changing the sort style of the following code from European yyyy/mm/dd to Us mm/dd/yyyy.
View 3 Replies View RelatedMy understanding had been that $.css("width") would return the original user selected style, eg "100%" or "10em", and $.width() returned the computed width, always in "px". Not so, following the code through for .css(), it calls something called getComputedStyle and the only difference between the two functions turns out to be a post-fix of "px" on the .css() result - not very useful. I need to know whether my user has called me with a proportional dimension, or a fixed one. How to tell with jQuery?
View 1 Replies View RelatedThis is probably quite a simple problem but I can't figure out the answer. I'm working on a site that has news stories and events coming in. What I would like is to have the news stories to be styled with squares and events with discs for instance. I might be able to change the actual plug-in so the CSS affects this change, but I just wondered how I could change the list-style-type with jQuery.
[Code]...
i am using .ajax() for making asyncronous call, in my case the resonse content type is "application/x-msexcel", in jsp setted content type. ajax call look like this:
$.ajax(
{
url : "url.do?button=default", cache: false,
[code].....
I've a HTML table on my JSP page, that I want to export to excel on a button click. How can I do this using jQuery ?
View 2 Replies View RelatedIs there an easy way to navigate through the fields of a form with the arrow keys in the same way as navigating cells in excel?
View 2 Replies View RelatedI have built a website and I wish to hide my code between "style type="text/css">....</style>
Is there a way to hide the code between it?
I have the table in my HTML page. I would like to implement down to excel functionality. Is there any reeadily available similar like as3xls.
View 2 Replies View RelatedI am having data in table. There is an checkbox in each row . I want checked rows to be exported to excel file when user click export button.
View 2 Replies View RelatedI have a <Html> Table with so Many <li> elements. SO when I export the html table to excel the cells are incrementing when ever it encounters <li> I want them to increment only when they encounter <th><td> Here is my jquery
[Code]....
Wantto import data from excel to SQL server from a web page, but wonder whether it is possible to do it without uploading the excel file from client's machine to server first.
View 4 Replies View Relatedi am new to Html and i am helping run a website for virtual golf. we were thinking of adding a Statistics page but would need the table used to be sortable so by hitting the header the column sorts the figures in order, the tablw would only be 50 rows and 8 columns. i have looked at the website [URL]../docs/but cant seem to sort out where to place things. a step by step guide would very much be appriciated.
View 6 Replies View RelatedIa have two different tables that are generated from an application.In the first one there are only <th> and the second one only <td>.I want the size of the first, second etc <td> to be equal to the corresponding <th>.I have managed to do that by putting ids in all of them and then make a function like:
$(function(){
takeHeight1 = $("#th1").width();
$("#td1").width(takeHeight1);[code]....
But I would like to do it more automatic...like without ids for each td and th
I would like to copy/clone the html DOM from "id1" to variable "tblContent",and remove the tag "<script>" and "<a>" from variable "tblContent", then append the html DOM to "id2" but not working...any error of my code? [code]
View 1 Replies View RelatedIs there any way to filter content by multiple parameter using jQuery
Something like in this site [url]but in my case I need to filter content using 3 different parameters. Price, Size and Location.