How can we submit a form without a submit button?

Showing Answers 1 - 36 of 36 Answers

Aditya Bhatt

  • Aug 19th, 2006
 

Using Java Script..

  Was this answer useful?  Yes

shweta maheshwari

  • Sep 13th, 2006
 

With the help of header function of php.

header("location :$url");

Kiran

  • Sep 15th, 2006
 

We can submit a form using the JavaScript. The code is some thing like this: form.submit();

Nilanjan Karmakar

  • Mar 22nd, 2007
 

/* folowing function is placed in the HTML head */


function nilanjan()
{
var k = document.myform.mylist.selectedIndex;
var url_add = document.myform.mylist.options[k].value;
window.location.href = url_add;
}

/* We all strive for good navigation on our web sites. Its the ultimate of any web developer to have a page linked to another by a maximum of 2 clicks. Drop down lists (HTML

elements) can be placed on all pages with links to the important pages on the web site. JavaScript allows us to make the visitor jump to a particular page by selecting an item from the drop down menu - and that too without a submit button. So you do not need to know any server-side language. JavaScript makes it easy to create a navigation list without a submit button. We employ the onChange() event handler along with location property of the window object.:-)

  Was this answer useful?  Yes

Atul Kulkarni

  • Apr 13th, 2007
 

We can do like this , call javascript function to any button or link and in that function write code like document.frm.submit();
But give <form name='frm' method='post' action='test.php'></form>

  Was this answer useful?  Yes

anandk

  • Jul 24th, 2007
 

we can use image, this is commenly using

<form id="form1" name="form1" method="post" action="kk.php">
  <INPUT TYPE="IMAGE" SRC="images/servicemain_04.gif" ALT="Submit button">

</form>

  Was this answer useful?  Yes

manjireee

  • Mar 11th, 2008
 

use <input type="button" name="" value="" onclick="return:javascript">

wirte function for java script like window.location="prog.php";

  Was this answer useful?  Yes

Swatha, it is not sound good. It won't submit the form. It will redirects to some other location(While redirect, we can't post any value. If we do, we will get ERROR ). We have to use JS script of form elements. Such as Image, text,  botton etc.

  Was this answer useful?  Yes

Swatha, it is not sound good. It won't submit the form. It will redirects to some other location(While redirect, we can't post any value. If we do, we will get ERROR ). We have to use JS script or form elements. Such as Image, text, botton etc.

  Was this answer useful?  Yes

amitverma

  • Feb 6th, 2009
 

On a particular JavaScript EVENT, you may call this function -

document.form_name.submit();

And that particular form will be submitted.

  Was this answer useful?  Yes

Make a call to JavaScript function. After that check if your browser supports xmlhttp object(ajax) or not.
After that request.open("GET",prgname.php,true) this function communicate with server page

swetha maheswari you are mistaken in this point. just header function redirect from one page to another.
But how can you pass form data from one page to another page? Header function will
not accept any parameters.

Hint: Better to use AJAX.

  Was this answer useful?  Yes

bhavsarpr

  • Jun 9th, 2009
 

 A form in Javascript can be submitted using document.formname.submit();

 Other functions like PHP's header("location :$url");  is transfering control from one page to another. It is not submitting form.

In Javascript, window.location(url) is also transfering control from one page to another without submission form.

Please let me know if anyone has anything more to add in this.

  Was this answer useful?  Yes

abc

  • Sep 12th, 2011
 

We can do like this , call javascript function to any button or link and in that function write code like

Code
  1. document.frm.submit();

  2.  

  3. But give <form name='frm' method='post' action='test.php'>

  4.  



  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions