You need to sign in to do that
Don't have an account?
csbaa
Custom button action fired when pressing ENTER
Hello Helpers
I have a question related to the behaviour of a visual force page when user clicks enter
I have a visual force page which capture some input from the user in apex:inputField elements
There are several apex:inputField elements each linked to a record
On the top of the page I have a apex:commandButton
when user clicks on the button I create several records in the background
BUT, my problem is that any time user add a value into one of the apex:inputField text box the press ENTER and the system interpret it as a button action
I want to disable it
I want to button action to be fired only when user click on it
I hope it is possible
Thanks in advance
csaba
I have a question related to the behaviour of a visual force page when user clicks enter
I have a visual force page which capture some input from the user in apex:inputField elements
There are several apex:inputField elements each linked to a record
On the top of the page I have a apex:commandButton
when user clicks on the button I create several records in the background
BUT, my problem is that any time user add a value into one of the apex:inputField text box the press ENTER and the system interpret it as a button action
I want to disable it
I want to button action to be fired only when user click on it
I hope it is possible
Thanks in advance
csaba
You can try this
Shaijan Thomas
Use this script to override default enter save button...
Thanks for replyoing to my questio regarding buttons
As I understood from your code below this is an event handler function
But how can I link this event handler with my buton or inputfield controls?
When this function is fired?
I inserted the code inside my VF page but nothing happened
<script type='text/javascript'> function runOnEnter(ev) { if (window.event && window.event.keyCode == 13 || ev.which == 13) { searchAccRecs(); return false; } else { return true; } } </script>
Thanks
Shaijan Thomas