send form automatically using setTimeout() - Javascript Browser Object Model

Javascript examples for Browser Object Model:Window setTimeout

Description

send form automatically using setTimeout()

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <script type="text/javascript">
    function send () {//from   w  ww .j a v a  2s.c o  m
        setTimeout(function(){document.getElementById("myForm").submit();},5000);
    }

      </script> 
   </head> 
   <body> 
      <form action="index2.html" id="myForm" method="get"> 
         <select name="sel" onchange="enviar()"> 
            <option value="1"> 1 </option> 
            <option value="2"> 2 </option> 
         </select> 
         <input type="submit"> 
      </form>  
   </body>
</html>

Related Tutorials