function myfunc () { var frm = document.getElementById("fo1"); frm.submit(); } window.onload = myfunc;