Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

How can we submit a form without a submit button?

user-image
Question added by Zaid Rabab'a , Software Development Team Leader , Al-Safa Co. Ltd.
Date Posted: 2013/04/02
marwa khalaf
by marwa khalaf , .Net Developer , Sands National Academy

The main idea behind this is to use Java script submit() function in order to submit the form without explicitly clicking any submit button.
You can attach the document.formname.submit() method to onclick, onchange events of different inputs and perform the form submission.
you can even built a timer function where you can automatically submit the form after xx seconds once the loading is done (can be seen in online test sites).

Hazem Salama
by Hazem Salama , Senior Member of Technical Staff , Verizon Communications

In addition to what marwa khalaf suggested, you can also submit data back to the server without leaving the current page using ajax calls.
If you use jQuery that would be pretty simple using $.ajax and set the type to "POST".
See this link for more details http://api.jquery.com/jQuery.ajax/

Mohammed Matar
by Mohammed Matar , IT Support Executive , Axiom Telecom

a simple way by using image button it have the same effect as the submit button

Rani Alomari
by Rani Alomari , Full Stack .Net Developer , Jordan Center for Diseases Control (JCDC)

Send Form function submit_frm(){ ob=document.getElementById('frm'); ob.method='post'; ob.action='page_name'; ob.submit(); }

Feras Abualrub
by Feras Abualrub , Web Solutions Manager , Qistas for Information Technology

div , image, span ->> onclick ->> AJAX Submit or normal javascript submit

Muktar SayedSaleh
by Muktar SayedSaleh , Software Engineering Manager , AIRASIA

using some js or jQuery.

Faizan Ahmad
by Faizan Ahmad , Software Engineer , cardekho.com

You can use ajax for that like on change you can fire $('xyz').change(function() { $('form').submit(); });

More Questions Like This

Do you need help in adding the right keywords to your CV? Let our CV writing experts help you.