I have a visual force page that has a date field that kept stealing the focus no matter what order the field was in and despite using <script>function setFocusOnLoad(){}</script>
.
I used windowOnLoad() to change the focus and that worked, however whenever a command button is clicked or lookup is used for a field the focus goes back to the same date field even if it is filled in. The buttons refresh some panels, but not the block that the date field is in so I don't know why the field keeps getting focus. The field has no properties in the visual force page that would change the focus.
Is there an event after panels/blocks are hidden/shown that would put focus on the field?