You need to sign in to do that
Don't have an account?

Handle ENTER event key press in visual force page
Hi all,
I want to ask how to handle ENTER event key press in visual force page? Is it possible using javascript or any suggestions? My case is I have 2 buttons in visualforce page and if I click ENTER regardless where I hit ENTER, I want my button no.2 to be run.. Is that possible?
Any suggestions would be great..
Thanks
Hi,
You can implement this through javacript code.Below is the code snippet to attain your requiremnt.
Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.
All Answers
Hi,
You can implement this through javacript code.Below is the code snippet to attain your requiremnt.
Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.
Hi,
thanks for the solution.. It works pretty well.. I added a few codes so it can run in Firefox too..
Thanx a lot..
Use : window.onkeypress=onKeyup_TxtFieldcom;
under your script.