Web Analytics Made Easy -
StatCounter On page load... - CodingForum

Announcement

Collapse
No announcement yet.

On page load...

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • On page load...

    How can I make a function happen when the page loads? For example I have this button on my page:

    Code:
    <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.

  • #2
    i believe this will help

    http://www.codesandbox.net/viewSandbox.php?code=35
    CodeSandbox.net - Programming questions answered.

    Comment


    • #3
      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>
      markaylward.co.uk

      Comment


      • #4
        Thank you very much for the help!

        Comment

        Working...
        X