Can you have a jeditable select that submits on selecting the dropdown (instead of needing the extra 'submit' ok button.
Asked
Active
Viewed 2,618 times
2 Answers
6
I think I have found a solution to this problem.
Knowing that jeditable will generate following html
<div id="status" class="editable_select">
<form>
<select name="value">
<option value="Active">Active</option>
<option value="Inactive">Inactive</option>
</select>
<button type="submit">Save</button>
<button type="cancel">Cancel</button>
</form>
</div>
I have just added following jQuery code
<script type="text/javascript">
$(document).ready(function () {
$('select').live('change', function () {
$(this).parent().submit();
});
});
</script>
(see jQuery + Jeditable - detect when select is changed)
HTH
0
I added this function:
if ('submit' == settings.onchange) {
input.change(function() {
form.submit();
});
}
Right before the line:
form.submit(function(e) {
And for all the selects that I want to be updated on the change event I pass the setting onchange:'submit'

Rismo
- 6,487
- 11
- 37
- 33