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
Rakesh ERakesh E 

How to prevent focus on first component in VF page

 

I have a senario where we there is a button called "Done" and after that i have a input textField. when user enters some value in input field and press on "Enter" key. this should invoke some javsript function for search purpose. but the function() which is defined for "Done" button is getting executed. i thought this might be the issue because of the focus is on "Done" button as the firts component is the "Done" button.

 

 

please provide me solution if anyone faced same problem.i need it urgently

 

Thank you

Regards

Rakesh

AquilaDeveloperAquilaDeveloper

In <apex:form > attribute if you use <apex:commandButton>  when you click on enter it will automatically invoke button...

its not regarding focus ....