Answers for "how to create form submition in javascript"

1

submit form automatically javascript

<form name="myForm" id="myForm" target="_myFrame" action="test.php" method="POST">
    <p>
        <input name="test" value="test" />
    </p>
    <p>
        <input type="submit" value="Submit" />
    </p>
</form>

<script type="text/javascript">
    window.onload=function(){
        var auto = setTimeout(function(){ autoRefresh(); }, 100);

        function submitform(){
          alert('test');
          document.forms["myForm"].submit();
        }

        function autoRefresh(){
           clearTimeout(auto);
           auto = setTimeout(function(){ submitform(); autoRefresh(); }, 10000);
        }
    }
</script>
Posted by: Guest on December-25-2020
8

javascript prevent form submit

<form name="foo" onsubmit="return false">
Posted by: Guest on March-04-2020

Code answers related to "how to create form submition in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language