...

View Full Version : On page load...



Chames
09-23-2006, 05:43 PM
How can I make a function happen when the page loads? For example I have this button on my page:


<INPUT TYPE="Submit" NAME="SUBMIT" ID="Submit" VALUE="click" class="button">

How can I make it click or submit automatically when the page is opened? I know its possible, I've done it before, I just forgot how.

Thanks.

CodeSandbox.net
09-23-2006, 08:59 PM
i believe this will help

http://www.codesandbox.net/viewSandbox.php?code=35

mark87
09-24-2006, 12:08 AM
That solution will work fine but you may want to do something like this as it's a bit less obtrusive:

<script type="text/javascript">
window.onload=function(){
document.myform.submit();
}
</script>

Chames
09-25-2006, 02:11 AM
Thank you very much for the help!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum