asobrado / jquery-datatables-editable

Automatically exported from code.google.com/p/jquery-datatables-editable
0 stars 0 forks source link

Adding doesn't detect error from server if I send it #109

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.  sAddURL: "addData.cfm", sAddHttpMethod: "POST",
2. Make your file to send an error back when trying to add a row containing 
already existent data inside the database

What is the expected output? What do you see instead?
Error being show to client.
Not adding row

What version of the product are you using? On what operating system?
Firefox 11.0

Please provide any additional information below.
I couldn't find any information that could help me.

Original issue reported on code.google.com by agcarlst...@gmail.com on 2 Apr 2012 at 1:55

GoogleCodeExporter commented 9 years ago
me too

Original comment by sgb...@gmail.com on 9 Jun 2012 at 3:28

GoogleCodeExporter commented 9 years ago
I have the same problem I m using firefox 12.0
no error is displayed at client side it adds new row at client side but not in 
original database in case of duplicate.... I want to display Error that record 
already Exist...... Please help me???? i attached my server side processing 
script

Original comment by innamhun...@gmail.com on 25 Jun 2012 at 9:00

Attachments:

GoogleCodeExporter commented 9 years ago
You could probably use the jAlert code here: 
http://code.google.com/p/jquery-datatables-editable/source/browse/#svn%2Ftrunk%2
Fmedia%2FjAlert

I've used that in the past and it works.

Original comment by dmol...@gmail.com on 18 Jul 2012 at 5:51

GoogleCodeExporter commented 9 years ago
Well you could just override the fnOnNewRowPosted like this:

fnOnNewRowPosted: function fnOnNewRowPosted(data) {
    if(data.indexOf("Error", 0) == 0)
    {
        //show error message
        return false;
    }
    // show success message
    return true;
}

Original comment by 2007pb...@gmail.com on 7 May 2014 at 1:02