As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.
Join the TIBCO Community TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.
From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
Request access to the private WebFOCUS User Group (login required) to network with fellow members.
Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.
How do you set the enter key on the key pad as a tab key in maintain. Most of our users uses the enter key as the tab key. However, in the apps that was developed the enter key is the tab key. I know in modify you can change the settings. Can this also be done in maintain.
Ok - This is pretty straight forward, but it's also brute force. If anyone has a different way, let us know. Basically, if checks to see if the ENTER key is pressed (13), checks the current field position, and moves the cursor to the next field. Please this trigger on the form itself
Mark
function OnForm1_KeyPress ( ) { var kp = window.event.keyCode; var curr = document.activeElement.id; if (kp==13) { if (curr=='Field1_Edit') document.Form1.Field2_Edit.focus(); if (curr=='Field2_Edit') document.Form1.Field3_Edit.focus(); if (curr=='Field3_Edit') document.Form1.Field1_Edit.focus(); } }
Posts: 663 | Location: New York | Registered: May 08, 2003
I've found this to work, particularly where there are many elements on the page.
function KeyPress ( ) {
// change minTabIndex and maxTabindex to the first and last input/editable elements on the form
var minTabIndex=1;
var maxTabIndex=5;
var kp = window.event.keyCode;
if (kp != 13) return;
var currentTabIndex = window.event.srcElement.getAttribute('tabindex');
var numElements = document.forms[0].length;
nextElement = document.forms[0].elements[0];
var minElement = ' ';
var maxElement = ' ';
var nextElement = ' ';
var currElement = ' ';
for(elementnum = 0; elementnum < numElements; elementnum++){
if (document.forms[0].elements[elementnum].getAttribute('tabindex') == minTabIndex) {
minElement = elementnum;
}
if (document.forms[0].elements[elementnum].getAttribute('tabindex') == currentTabIndex) {
currElement = elementnum;
}
if (document.forms[0].elements[elementnum].getAttribute('tabindex') == maxTabIndex) {
maxElement = elementnum;
break
}
if (document.forms[0].elements[elementnum].getAttribute('tabindex') > currentTabIndex) {
nextElement = elementnum;
break
}
}
if (maxElement == currElement) {
document.forms[0].elements[minElement].focus();
return;
} else {
if (nextElement == ' ') {
document.forms[0].elements[maxElement].focus();
return;
} else {
document.forms[0].elements[nextElement].focus();
return;
}
}
}
if(document.captureEvents) document.captureEvents(Event.KEYPRESS);
document.onkeypress = KeyPress;
Make sure your tab order is set up, and then set the minTabIndex and maxTabIndex. Put this code in a .js file and attach it to your form.
If you have an issue with this, come back to me 'cos I know how I set up the maintain forms, so have not tried it with the way others might do it differently, or you may want a bit more explanation.
Alan. WF 7.705/8.007
Posts: 1451 | Location: Portugal | Registered: February 07, 2007
Most of our users uses the enter key as the tab key.
You would be better off to train the users to use the Tab key as it is intended. I can't see where their current behavior is of any value in todays IS/IT world.
On most any web page with a form, the Enter key will submit the form. If you remap the function of the Enter key, you are just reinforcing bad user interface behavior, that will cause them grief down the road.
And, you won't have to figure out how to add Alan's Javascript to your Maintain
Both techniques need to be set up as javascript triggers. If you use my technique do this:
1) Display the form in question 2) Click on the Trigger Tab 3) Select the KeyPress trigger 4) Change trigger type to JavaScript and include my trigger code. You will have to change the names of my objects to reflect the name of your objects.
Mark
Posts: 663 | Location: New York | Registered: May 08, 2003