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
devfredevfre 

Need to remove focus from the field

How to remove the focus from the first text field when the page is loading? Pls let me know as it is urgent.

Best Answer chosen by Admin (Salesforce Developers) 
JitendraJitendra

It is Custom Page or Standard Page?

 

If it is the Standard page then you will need to use heavy javascript however if it is the custom VF page. Then create a span element and on page load focus this element.

 

You can check Question 100 in below Salesforce Interview Questions.

http://shivasoft.in/blog/salesforce/salesforce-interview-questions-part-10/

All Answers

JitendraJitendra

It is Custom Page or Standard Page?

 

If it is the Standard page then you will need to use heavy javascript however if it is the custom VF page. Then create a span element and on page load focus this element.

 

You can check Question 100 in below Salesforce Interview Questions.

http://shivasoft.in/blog/salesforce/salesforce-interview-questions-part-10/

This was selected as the best answer
devfredevfre

I tried by the way you told. It is working fine. But whenever i changes any picklist field which is having action support : onchange event, then the focus is again going to the first input field. How to prevent that?