If you want to instantly give focus to a HTML controls such as input text the script below is very useful.
First you need to name the ID attribute.
<input type="text" id="focusme" />
Then you can add this java script below your codes.
<script type='text/javascript'>
document.getElementById('focusme').focus();
</script>
When you try to refresh your page it will instantly give focus to the element with an id invoked by the java scriptLabels: PHP, Scripts