Hi everyone, I want to use Javascript to validate the user's input in the text impropt, change it to upper_case.
I am using the following script:
<script>
// This script will upper_case the input value of the TEXT prompt named UID.
function ValidatePage(){
document.formWarpRequest._textEditBoxUID.value=document.formWarpRequest._textEditBoxUID.value.toUpperCase();
promptButtonFinish();
}
for(var i=0; i<pageNavigationObserverArray.length; i++){
cntlName = eval( pageNavigationObserverArray );
if(cntlName.m_oParent.onclick.toString().indexOf('promptButtonFinish()')>0){
cntlName.m_oParent.onclick = ValidatePage; }
}
</script>
The issue is when user click the 'submit' button everything is fine, but if user press enter key it does not do the validate function.
Is there anything I can do for that?
Thanks a lot.
I am using the following script:
<script>
// This script will upper_case the input value of the TEXT prompt named UID.
function ValidatePage(){
document.formWarpRequest._textEditBoxUID.value=document.formWarpRequest._textEditBoxUID.value.toUpperCase();
promptButtonFinish();
}
for(var i=0; i<pageNavigationObserverArray.length; i++){
cntlName = eval( pageNavigationObserverArray );
if(cntlName.m_oParent.onclick.toString().indexOf('promptButtonFinish()')>0){
cntlName.m_oParent.onclick = ValidatePage; }
}
</script>
The issue is when user click the 'submit' button everything is fine, but if user press enter key it does not do the validate function.
Is there anything I can do for that?
Thanks a lot.