Feb20

remove the ok button in jeditable select

Posted by: Brian Chan | Filed in: technology | Tags: | 02:53 pm, February 20th, 2012 Add comments

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. Disallow de-select when select-all is checked
  3. The “select all” checkbox to select all checkboxes
  4. Select the last option of a drop down
  5. dataTables editable plugin multiple select

Leave a Reply