I am in CICS transaction. I use clear screen button. The screen is clear but the cursor is displayed at bottom screen and when I type cesf logoff, I receive this message : Transaction '' is not recognized.
I must move my cursor to the top for execute my transaction.
You can see in the dump that cursor position should be 0,0
screen dump
Firefox will put the cursor at the bottom of the screen,
the following code will fix this problem.
Modify src/org/h3270/render/HtmlRenderer.java
add the following line in renderUnformatted
result.append (" document.forms[\"" + getFormName(id) + "\"].field.setSelectionRange(0,0);\n");
See below:
private void renderUnformatted (Screen screen, String id, StringBuffer result) {
result.append ("<textarea name=\"field\" class=\"h3270-input\" "
+ "cursor=\"lime\" "
+ "rows=" + screen.getHeight()
+ " cols=" + screen.getWidth() + ">\n");
for (int y = 0; y < screen.getHeight(); y++) {
for (int x = 0; x < screen.getWidth(); x++) {
char ch = screen.charAt (x, y);
if (ch == '\u0000')
result.append (' ');
else
result.append (ch);
}
result.append ("\n");
}
result.append ("</textarea>\n");
result.append ("<script type=\"text/javascript\">\n");
result.append (" installKeyHandler(' " + getFormName(id) + "');\n");
result.append (" document.forms[\"" + getFormName(id) + "\"].field.focus();\n");
result.append (" document.forms[\"" + getFormName(id) + "\"].field.setSelectionRange(0,0);\n");
result.append ("</script>\n");
}