How can we submit form without a submit button?

Posted on

JavaScript provides the form object that contains the submit() method. Use the ‘id’ of the form to get the form object.

<form action="" method="post" id="foo">
<input type="hidden" name="LoginEmail" value="user [at]">
<input type="hidden" name="LoginPassword" value="mycleartextpassword">
<input type="submit" name="Authenticate" value="Login">
<input type="hidden" name="Action" value="1" >
I can make it with javascript:
<form id="foo"> .... < /form>

<script type="text/javascript">
    function myfunc () {
        var frm = document.getElementById("foo");
    window.onload = myfunc;

Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s