views:

300

answers:

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!

+1  A: 

Sorry, found where I was going wrong!

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

Rigobert Song
A: 

Hi Robert,

Can you explain how you echo'd the result in your PHP? I am running into the same problem.

Thanks, Charles

in your php file you have to use print or echo out your result as the plugin returns the result of the php page! make sense?
Rigobert Song
Yes, thanks Rigobert. (PS: I apologize for spelling your name wrong initially - didn't pay attention.)Thanks again for your help!- Charles
A: 
<?php echo $_REQUEST["value"]; ?>
A: 

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.

nvoyageur