Introduction
Application customization, by using JavaScript “Key Disabling” can be achieved, thereby preventing the user from feeding the particular key input value into the system. It restricts the characters which need not to be entered into a particular field in a Form or Report column.
Steps To Follow
Step1:
Creation of JavaScript Function
Create the following JavaScript Function in the page HTML Header Region.
Source Code:
<SCRIPT language=JavaScript>
<!—
function isNumberKey(evt)
{
var charCode = (evt.which) ? evt.which : event.keyCode
if (charCode > 31 && (charCode < 48 || charCode > 57))
return false;
return true;
}
//–>
</SCRIPT>
Step2:
Calling the JavaScript Function
Call the JavaScript function on the particular Report Column/Field in which the Keys has to be disabled.
onkeypress=”return isNumberKey(event);”
(Or)
onclick=”return isNumberKey(event);”
Call To Action
For Oracle apex development and customization please do visit us..Our company website https://doyensys.com/
Conclusion
The Input Key does not work in the field where the JavaScript function is called, provided if the Input Key code falls between the char-code entered in to the JavaScript function.