Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sDeleteUrl always returns failure status and fails to delete Row #161

Open
GoogleCodeExporter opened this issue Feb 3, 2016 · 0 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. I have the following libraries
        <style type="text/css" title="currentStyle">
        @import "/js/datatables/media/css/demo_page.css";
        @import "/js/datatables/media/css/demo_table.css";

        </style>
        <script type="text/javascript" language="javascript" charset="utf-8" src="/js/datatables/media/js/jquery.js"></script>
        <script type="text/javascript" language="javascript" charset="utf-8" src="/js/datatables/media/js/jquery.dataTables.min.js"></script>
        <script type="text/javascript" language="javascript" charset="utf-8" src="/js/datatables/media/js/jquery.jeditable.js"></script>
        <script type="text/javascript" language="javascript" charset="utf-8" src="/js/datatables/media/js/jquery.dataTables.editable.js"></script>
        <script type="text/javascript" language="javascript" charset="utf-8" src="/js/datatables/media/js/jquery-ui.js"></script>
        <script type="text/javascript" language="javascript" charset="utf-8" src="/js/datatables/media/js/jquery.validate.js"></script>

2. and the following is my makeEditable code
oTable.makeEditable({
                                    sDeleteRowButtonId: "btnDeleteTask",                                    
                                    sUpdateURL: "/servlets/ProjectScopeScratchPadServlet?FWAction=update&sessionId="+sessionId+"&item=1",
                                    sDeleteURL: "/servlets/ProjectScopeScratchPadServlet?FWAction=deleteTask&sessionId="+sessionId,                                                                                                         
                                    fnOnDeleting: function(tr, id)
                                    {   
                                        $("#trace").append("Deleting row with id " + id);
                                        return true;
                                    },
                                    fnOnDeleted: function(status)
                                    {       
                                            alert(status+" deleting Tasks");
                                    },                                  
                                        "aoColumns": [
                                                        null,
                                                        null,
                                                        { indicator: 'Saving...',
                                                            tooltip: 'Click to edit Description',
                                                            loadtext: 'loading...',
                                                            "onblur": "submit",

                                                            oValidationOptions : 
                                                                       { 
                                                                           rules:{ 
                                                                                   value: {                                                                                                  
                                                                                             maxlength: 30                                                                                                                                                              
                                                                                          }
                                                                           },
                                                                           messages: { 
                                                                                   value: {
                                                                                        maxlength: "Description can only be upto 30 characters" } 
                                                                           }
                                                                       },
                                                            callback: function( sValue, x) {                                                            
                                                            var aPos = oTable.fnGetPosition( this );                                                                                                                                                                 
                                                            oTable.fnUpdate( sValue, aPos[0], aPos[1], true, true);
                                                             }  
                                                         },
                                                        null,
                                                        null,
                                                        null,
                                                        null,
                                                        null,
                                                        null,
                                                        null,
                                                        null
                                                        ]       
                });

What is the expected output? What do you see instead?
When i press my "delete" button, I am returning "ok" from my servlet, but it 
always shows a failure status in the alert. And it fails to delete the record 
too.

What version of the product are you using? On what operating system?
I am using jQuery v1.8.2 on IE.

Please provide any additional information below.
Please let me know what i am doing wrong.

Original issue reported on code.google.com by asif.h1...@gmail.com on 28 Oct 2013 at 10:06

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant