Submit form on page load - firefox

Discussion in 'JavaScript' started by Licensescript.com, Mar 12, 2010.

  1. #1
    Hi could someone help me. What is the javascript to submit a form on pageload in FIREFOX! (and IE as well but most are IE).
     
    Licensescript.com, Mar 12, 2010 IP
  2. krsix

    krsix Peon

    Messages:
    435
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #2
    <script type="text/javascript">
    // replace formId with the name of your form's id field
    function dsb(){var f = document.getElementById("formId"); try{f.submit();}catch(err){}}
    dsb();
    </script>
     
    krsix, Mar 12, 2010 IP
  3. weathor

    weathor Peon

    Messages:
    148
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    and ofcourse

    <BODY onLoad="javascript:dsb();"> :)
     
    weathor, Mar 12, 2010 IP