0

Can someone help me figure this out please?

I am working with an inline editor and need to alert() an error if the server returns one. I have no idea how to do this. I'm brand new to jquery so you;ll have to spell things out for me.

I'm using the editor here: http://code.google.com/p/jquery-in-place-editor

I'm using the following code example. THis works to edit but I have no alert on error.

      $("#editme1").editInPlace({
//      callback: function(unused, enteredText) { return enteredText; },
        url: 'server.php'
      });
jim
  • 1

1 Answers1

0
$("#editme1").editInPlace({
    //callback: function(unused, enteredText) { return enteredText; },
    url: 'server.php',
    error: function() {alert('Server responded with error');}
  });

According to your link.

sje397
  • 41,293
  • 8
  • 87
  • 103
  • Thanks sje. Can you tell me what I need to return from my server code? false? I can't seem to trigger an error – jim Oct 13 '10 at 04:32
  • @jim: [This](http://stackoverflow.com/questions/3052715/php-how-to-return-an-http-500-code-on-any-error-no-matter-what) seems to be how it's done. – sje397 Oct 13 '10 at 04:45