Forum Moderators: open
<html>
<head>
<body onload = "document.frm.btn.click();">
<form name = "frm">
<input type = "button" name = "btn" value = "click" onclick = "alert('hi welcome')">
</form>
</body>
</html>
Check this thread [webmasterworld.com] for a message I posted yesterday. I think it will do what you're looking for, or at least give you a place to start. (6th message)