Editor buttons callback function

Editor buttons callback function

YudsTableYudsTable Posts: 6Questions: 3Answers: 0
edited March 2016 in Free community support

Thank you for come here ,
How to rewrite the call back function of (new,edit,remove) buttons,and close the modal after submit , and is there any more attributes for buttons such ad formButtons and formMessage. Can I modify the editor like this way:

    editor = new $.fn.dataTable.Editor( {
           "ajax": {
               "url": "${pageContext.request.contextPath}/index/add",
               "data": {
                    "name":"asdfdsf"
                },
               success:function(){
                    this.close();
                }
            }

Edited by Allan - Syntax highlighting. Details on how to highlight code using markdown can be found in this guide.

Answers

  • allanallan Posts: 61,744Questions: 1Answers: 10,111 Site admin

    You should not override the success method of the ajax option (which is noted in the ajax documentation). Doing so would replace Editor's own success method and thus cause issues.

    The modal should submit automatically after edit, if it is not, then likely the server is not returning data in the expected JSON format.

    Can you link to the page showing the issue so I can double check that?

    Allan

This discussion has been closed.