A sample of my code is here: http://develop.davzy.com/test2.php
<input name="avatarfile" type="file" id='uploadbutton' />
<script>document.getElementById("uploadbutton").click()</script>
It is supposed to open the file selector as soon as you open the page. It works in IE8, IE9, FireFox, but not in Chrome.