I use this code to create a div element with inside a text and a button, for than adding this div in a cell of the jquery grid.
Everything works fine with firefox and IE instead in chrome I found out with alerts that only the click of the button is added, the other handlers like change and keyup NO or are not triggered.
myJQGrid.myElemKodi = function (value, option, disabled, lastsel2, id) {
var el3 = $('<div></div>');
var textField = $('<input type="text" />');
textField.attr('id', id + lastsel2);
textField.val(value);
textField.width('77%');
//textField.keypress(function (event) { keyPressKodi(event); });
textField.keyup(function (event) {
if (event.which > 45 || event.which == 32 || event.which == 8) {
if (($('#' + id + lastsel2).val() == "")) {
$('#' + id + lastsel2).autocomplete('close');
return;
}
keyPressKodi(event);
}
});
textField.change(function () { changeFunc(null, null); });
if (disabled == 'True')
textField.attr("disabled", "disabled");
textField.appendTo(el3);
var button = $('<input type="button" />');
button.val('...');
if (disabled == 'True')
button.attr("disabled", "disabled");
button.attr("name", "button1");
button.click(function () { ButtonClickKodi(); });
button.width('18%');
button.appendTo(el3);
return el3;