Question
5
Replies
111
Views
Posted: May 15, 2018
Last activity: May 17, 2018
Closed
Solved
In Non-IE browser, Flow Action is submitted when pressing the Enter Key
Upon hitting the enter key on a text input field, the flow action is getting submitted in Non-IE browser. Using 6.3 SP1
The below code works fine in IE but not in Chrome/FF.
function disableEnterKey(e)
{
var key;
if(window.event)
key = window.event.keyCode;
if(key == 13)
return false;
else
return true;
}
document.onkeydown = disableEnterKey;
Hello ,
I think you have missed some flower braces in the code.Kindly try the below suggested code at your end:-
Code:-
<script>
function disableEnterKey(e){
var key;
if(window.event){
key = window.event.keyCode;
}
if(key == 13){
return false;
}
return true;
}
document.onkeydown = disableEnterKey;
</script>
Copy and paste the above code in your userworkform.
If the above code doesn't help, kindly check this link which provides information about the events and key code in chorme and fire fox browser.
https://www.aspsnippets.com/Articles/Solved-JavaScript-windoweventkeyCode-not-working-in-IE-Mozilla-FireFox-Chrome-Safari-and-Opera.aspx
Hope this helps.
Thanks,
Hari