[jQuery] sortStart and sortEnd triggers - tablesorter

2009-01-20 Thread Soledad Zubiri
Hello, I am here again and I explain you my problem:

 This table has the option to select the required row through a radio
button. But the problem is that if I sort the table (by any column) after
selecting some row, the selection goes off.
 I think that maybe I can use the sortStart and sortEnd triggers to
maintain the state of the radio buttons in the table after sorting, but I`m
 still having problems.

 $("#tarjetas").tablesorter({widgets: ['zebra']});

 
   
    
   Tarjeta
   Descripción
  
  
   

   
   
   
  
 

function chequearRadio() {
  for (var i=0;i

[jQuery] radio buttons in tablesorter

2009-01-12 Thread Soledad Zubiri
Hello , I'm having a problem with radio button in a table:

I have a table that has the option to select the required row through a
radio button. But the problem is that if I sort the table (by any
column) after selecting some row, the selection goes off.

Is there any way to maintain the state of the radio buttons in the table
after sorting?

Thanks a lot!!

Soledad.


[jQuery] Table Sorter - Problem sorting numbers with comma seperators

2008-12-29 Thread Soledad Zubiri
Hi!
it`s me again, I`m new using tablesroter and I don´t know how to solve this
problem of sorting numbers with comma separators(it doesn`t sort well), I`ve
been looking everywhere but I didn`t get a solution. Can anybody help me??

Thanks Sole.


[jQuery] Tablesorter, problems ordering numbers

2008-12-29 Thread Soledad Zubiri
Hello,

I have a tablesorter with a numeric column (the type is String so I have to
use a parser to order the column as number ), the problem is that it does
not order long numbers with comas separator.

Here is the example of the sorted column:

desc order-->  -363,122,000.00;
  -28,000.00;
   3,364,000.00;
  10,000.00;
   68,000.00

asc order--> 68,000.00;
  10,000.00;
  3,364,000.00;
  -28,000.00;
  -363,122,000.00

And this is part of my code:

$.tablesorter.addParser({
id: "digit2",
is: function(s,table) {
var c = table.config;
return $.tablesorter.isDigit(s,c);
},
format: function(s) {
alert(s);
   if (s.match(',')) {
s = s.replace(/\,/, '');
   }
   if (s.match('<')) {
s = s.replace(/\

[jQuery] Re: two submits in the same form

2008-12-23 Thread Soledad Zubiri
Thanks Jörn!

 The link you send me was very helpfull for me. For solving my case I used:
 $ ("#myinput").*rules*("add", {
required: true,
minlength: 2,
messages: {
   required: "Required input",
   minlength: jQuery.format("Please, at least {0} characters are necessary")
}
});
$ ("#myinput").*rules*("remove");

Thanks very much!!! sole


[jQuery] two submits in the same form

2008-12-22 Thread Soledad Zubiri
Hello, here I provide more of my code so we you see exactly what I'm trying
to accomplish...

code:

$(document).ready(function() {
 var validator = $("#form1").bind("invalid-form.validate", function() {

   $("#summary").html(""+
  ""+
  "");
  }).validate({
  rules: {
   errorContainer: $("#summary"),
   input1: "required",
   input2: "required",
   input3: "required"
 },
 messages: {
   input1: ,
   input2: ,
   input3: 
   }
   }
  });
  });



 





Submit link



I have the submit button that validate that input1, input2 and input3 are
complete and then
submit the form (redirect to page1.jsp)
And I need to have a link that opens a pop-up window after checking that
input1 is not
empty.
So I think that maybe I can have two diferent validations form the same
form, one for the submit
button (the one I`m doing in this code) and one for the submit link (that
need to check that input1
is required), but I`m a begginer in jquery so I don`t know if it is
possible...

Anybody could help me??
Thank! Sole.


[jQuery] tablesorter order positive and negative numbers

2008-12-22 Thread Soledad Zubiri
I have a tablesorter with a column with positive and negative numbers, and
I`m using the tablesorter`s parser digit  but it doesn`t order fine, is
there any other parser that works ok?

Thanks!! sole

 ts.addParser({
  id: "digit",
  is: function(s,table) {
   var c = table.config;
   return $.tablesorter.isDigit(s,c);
  },
  format: function(s) {
   return $.tablesorter.formatFloat(s);
  },
  type: "numeric"
 });

   $("#my_table").tablesorter({headers: {1: {sorter:'date/MM/DD'},   5:
{sorter: 'digit'}  },widgets: ['zebra']});


[jQuery] Re: submit a form with a link

2008-12-22 Thread Soledad Zubiri
Hi, my english is not good enough, I hope I can explain it to you!!!

I`m using this to validate:

$(document).ready(function() {
 var validator = $("#form1").bind("invalid-form.validate", function() {

   $("#summary").html(""+
  ""+
  "");
  }).validate({
  rules: {
   errorContainer: $("#summary"),
   input1: "required",
   input2: "required",
   input3: "required"
 }
  });
  });


I have the submit button to validate that the 3 inputs are complete and
redirect to page1.jsp,
and the submit link that checks that only input1 is complete to opens a
pop-up window.

Thank! Sole.


[jQuery] Re: submit a form with a link

2008-12-22 Thread Soledad Zubiri
Thanks Jörn!! It works!

But I continue with a problem because the link Submit has to validate that
only input1 of the
form is not empty. And the submit button validates that the three inputs are
no empty.
So I think that I will have two validations for the same form. How can I do
that?

I have a form with 3 inputs:







Submit link


Thanks again! Sole