Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>My original answer was based on reading the documentation of jQuery Editable, which is a jQuery extension that is similarly named, but not the same as jEditable from the question. Let's try again with the correct library.</p> <p>The problem is that you are moving the focus away from the input box when pressing tab, but when the focus is moved away from it, it doesn't save the contents. To illustrate this, try this: click one of the fields and edit it, then click elsewhere on the document. You'll see that the value in the table - and this is what you where simulating using the <code>blur()</code> jQuery function on the element.</p> <p>There are (again) two ways to solve this problem. First, we can modify what the program does when a field loses focus:</p> <pre><code> [..] "submitdata": function ( value, settings ) { return { fieldname: this.getAttribute('fieldname'), rowID: this.getAttribute('id') }; "onblur": "submit"; }, [..] </code></pre> <p>This has the effect that when doing the experiment I described above to help you understand why it wasn't working, you'll now also see that it gets saved. This may not be what you want. In that case, you can instead make sure that you trigger a submit instead of a blur:</p> <p>replace this line:</p> <pre><code> $(this).find("input").blur(); </code></pre> <p>by this one:</p> <pre><code> $(this).find("form").submit(); </code></pre> <p>Now the experiment will no longer cause the value to be changed, but it's no longer an accurate simulation of what we're doing and when pressing tab the value will be changed.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload