4

My code is:

$(document).ready(function() {
            $('.post_title').editable('editposttitle.php', {
                cancel    : 'Cancel',
                        submit    : 'OK',
                indicator : 'Saving...',
            });
        });

When saving text the text'Click to edit' is inserted into my element? instead of the saved text?

Any ideas?

Thanks!

Rigobert Song
  • 2,766
  • 2
  • 30
  • 47

3 Answers3

9

Sorry, found where I was going wrong!

I didn't echo the new value in my php.

Rigobert Song
  • 2,766
  • 2
  • 30
  • 47
  • For clarification: Jeditable sets the contents of the jEditable element to whatever content your server returns. If your server returns no content then it sets the contents to "Click to edit" – Chris W. Apr 12 '11 at 20:02
0
<?php echo $_REQUEST["value"]; ?>
0

For me the fix was not opening the file up locally as a file, but accessing it through a webserver. Not sure why this was the case, but as soon as I put the example file on a webserver it started working.

Shane Stillwell
  • 3,198
  • 5
  • 31
  • 53