Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    callback in form.saveData() not being executed

    I have a click method on a button item in a form that calls form.saveData(). The callback is not being executed. The log file tells me that the DMI method is being executed (add()) and there are no errors on the server. The new data is being properly saved in the database. No errors appear in the Developer's Console.

    Here is the button item in the form:
    Code:
     {name:"save", title:"save", type: "button", width: 100,
                			startRow: false, endRow: false, colSpan: 2, align: "center",
                			click: function(form, item) {
                				form.saveData("\"" + form.clickHandler.getID() + ".setPage(data)\"");
                			}
                	},
    The server logs tell me that the add() method is executing to completion and returning results.

    Are there any other things I can do to get some additional info. Also, could you suggest possible reasons for this. (the method setPage(data) does exist and I get no client side errors regarding it's execution.

    thanks,
    pf

    #2
    When you pass a callback as a String, it is basically being executed via eval(). Because you have extra, interior quotes in the callback, what your callback does is define a JavaScript String and exit :)

    Comment


      #3
      Thanks. That did it.

      Comment

      Working...
      X