[SalesForce] X-editable POST URL parameter and Visualforce

I would like to build a page using the framework X-editable

My question is this:

  1. It takes a parameter of URL on the field which is documented as:

url to server-side script to process submitted value

The url is posted using ajax so what URL would I use?

The documentation shows /post or post.php, if I had a javascript remote method how could I use it somehow? It is basically using query.ajax to send the request.

I appreciate any help you could offer in constructing the url for the ajax call, otherwise, it does allow functions that I can use instead of Ajax but trying to simplify things.

Best Answer

I've found an approach to do that, you can set manually the success function when the user edit a field, so, you must add for example the remoting callouts into this function.

    //Set inline editor
    $.fn.editable.defaults.mode = 'inline';

    $(document).ready(function() {
        // Init editor
        $('#username').editable({
          type: 'text',
          title: 'Enter username',
          success: function(response, newValue) {
             // here add you salesforce remoting code
             alert('username' + newValue);
          }
       });
   });
Related Topic