Search code examples
phpjqueryjeditable

jeditable placeholder issue


I am using jeditable, the place holder is a text. I am trying to have it where after I edit the box the placeholder is the text that I typed. not the actual text "click to edit" on the demo site after you edit the input box "click me if you dare" it will show what u typed.i copied the js and used it but it doesnt behave that way. any hint/guidance would be greatly appreciated. (the field name is notes and its pulled using an sql statement. save.php does an UPDATE on that same field.)

demo: http://www.appelsiini.net/projects/jeditable/default.html
jeditable.js:

http://www.appelsiini.net/download/jquery.jeditable.js

var e = jQuery.noConflict();
  e(".click" + zid).editable("http://www.site.com/save.php", { 
        id   : 'did',
         name : 'nvalue',
      indicator :  'Saving...',
      tooltip   : "Click to add/edit notes",
      style  : "inherit",
      width      : '630px',
      onblur     : 'submit',
     placeholder: 'click to edit',
      type   : "textarea"
  });

Solution

  • Your saving script must echo back the string you want to display on webpage. Jeditable displays the default placeholder if saving script does not return anything.