remove the ok button in jeditable select

The default sample code for <select> in jeditable has an OK button. That ends up requiring one more click to pick a value from a dropdown.

1
2
3
4
5
 $('.editable').editable('http://www.example.com/save.php', { 
     data   : " {'E':'Letter E','F':'Letter F','G':'Letter G', 'selected':'F'}",
     type   : 'select',
     submit : 'OK'
 });

To take away that OK button, just take out that “submit” attribute. Magically, after picking a value from the dropdown the value gets updated. Kudos to the contributor who enabled this feature. ;)

1
2
3
4
 $('.editable').editable('http://www.example.com/save.php', { 
     data   : " {'E':'Letter E','F':'Letter F','G':'Letter G', 'selected':'F'}",
     type   : 'select'
 });

The hack mentioned in the following link is not applicable anymore, assuming you are using the latest version of jeditable.

http://stackoverflow.com/questions/1961383/is-there-anyway-to-in-jeditable-to-removing-submit-button-when-using-select




Related posts:

  1. Jeditable – Edit In Place Plugin For jQuery
  2. Select the last option of a drop down
  3. Disallow de-select when select-all is checked
  4. The “select all” checkbox to select all checkboxes
  5. Using ajax to do a file submit

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>