function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
sunny@99-chgsunny@99-chg 

Problem With Command Button

Hai,

 

In my vfpage I have One Textbox and Two Commandbuttons as button1 ans button2.

 

Afetr entering the Text in Textbox And Click on Button1,My functionality is working Fine.

 

When I enter Text in textbox and press Enter key from Keyboard..The Button2 action is performing,Here I need to work the Button1 Functionality.

 

How to do this,Can Anyone Suggest me...

 

 

Best Answer chosen by Admin (Salesforce Developers) 
bob_buzzardbob_buzzard

This behaviour is browser specific AFAIR - take a look at the solution I posted on this thread:

 

http://boards.developerforce.com/t5/Visualforce-Development/Enter-key-on-VF-Page/td-p/199787

 

this basically intercepts the enter key and clicks the preferred button using javascript.

All Answers

vishal@forcevishal@force

Can you share your existing code here?

 

bob_buzzardbob_buzzard

This behaviour is browser specific AFAIR - take a look at the solution I posted on this thread:

 

http://boards.developerforce.com/t5/Visualforce-Development/Enter-key-on-VF-Page/td-p/199787

 

this basically intercepts the enter key and clicks the preferred button using javascript.

This was selected as the best answer
sunny@99-chgsunny@99-chg

Thanks Bob,

 

Its working Fine