Set focus/cursor position on a field using double mouse click
Posted: 23 Jul 2024, 18:16
In the DDS for an application the MOUSBTN key word has been used to enable mouse double clicking on a field on a 5250 screen. The F22 function key has also been assigned so that the user can use the function keys as well as the double mouse click. When F22/Double Click is used it acts as a kind of prompt on the field or can bring up additional information screens or go to specific details screens associated with that field. The fields can be input or output capable.
For the screen I've put this script in the 'On Arrive'
window.ondblclick = function(e){
console.log("double click event fired");
SENDKEY("F22");
};
This works, however I'm not picking up the field that I double clicked on so the cursor has not be set in the right position. How do I set the focus and cursor position for the field that I've double clicked on?
For the screen I've put this script in the 'On Arrive'
window.ondblclick = function(e){
console.log("double click event fired");
SENDKEY("F22");
};
This works, however I'm not picking up the field that I double clicked on so the cursor has not be set in the right position. How do I set the focus and cursor position for the field that I've double clicked on?