References:
Problem:
When a Visualforce Page loads, the date input field is selected by default. The usual behavior is that the first input field or box in the page is focussed by default. Clearly annoying in this case
Solution:
Add the below piece of code in your visualforce page.
Tried the other option suggested, but it does NOT work for me.
- http://boards.developerforce.com/t5/Visualforce-Development/How-to-remove-focus-from-first-input-field/td-p/105445
- http://boards.developerforce.com/t5/Visualforce-Development/inputField-Calendar-Widget/m-p/71094#M1050
Problem:
When a Visualforce Page loads, the date input field is selected by default. The usual behavior is that the first input field or box in the page is focussed by default. Clearly annoying in this case
Solution:
Add the below piece of code in your visualforce page.
<script>
function setFocusOnLoad() {}
</script>
Tried the other option suggested, but it does NOT work for me.
<script>beenfocused = true; </script>