Image

Help on setTimout()

I'm trying to call a method from the body onload to submit my form after 60 seconds has passed. But it's ignoring the time I set and just submitting the page right when it loads.

my functions:

SCRIPT LANGUAGE="JavaScript"><!--
function doOnload() {
setTimeout(formsubmit(),60000);
}
//-->
</SCRIPT>SCRIPT LANGUAGE="JavaScript"><!--
function formsubmit() {
alert('its time!');
top.main.location.href =
"/rrr/rrrServlet?action=autosave"
}
//-->
</SCRIPT>


and in the body tag:
onLoad="doOnload();"

Anyone know why it's ignoring the time?

Thanks