How can I execute javascript to set focus to a checkbox control in a form?
form.setItemFocus(“myCB”); doesn’t work
form.getInput(“myCB”) returns null
How can I execute javascript to set focus to a checkbox control in a form?
form.setItemFocus(“myCB”); doesn’t work
form.getInput(“myCB”) returns null
getting closer:
form.getCombo(“combo1”).setFocus();
will focus the combo. However, if it is focused by tabbing via keyboard, the contents are also selected. How can I select the contents via javascript?
the following are ignored:
form.getCombo(“combo1”).selectionStart = 0;
form.getCombo(“combo1”).selectionEnd = 200;
(not a surprise as selectionStart, selectionEnd do not occur within dhtmlxcombo.js)
form.setItemFocus(“myCB”) work fine locally. make sure you have item with name:“myCB”
otherwise please send link or completed demo to support at dhtmlx dot com