Communiquez avec les autres et partagez vos connaissances professionnelles

Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.

Suivre

How can we submit a form without a submit button?

user-image
Question ajoutée par Zaid Rabab'a , Software Development Team Leader , Al-Safa Co. Ltd.
Date de publication: 2013/04/02
marwa khalaf
par 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
par 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
par 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
par 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
par Feras Abualrub , Web Solutions Manager , Qistas for Information Technology

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

Muktar SayedSaleh
par Muktar SayedSaleh , Software Engineering Manager , AIRASIA

using some js or jQuery.

Faizan Ahmad
par 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

Avez-vous besoin d'aide pour créer un CV ayant les mots-clés recherchés par les employeurs?