answersLogoWhite

0

Yes by using:

document.forms["myform"].submit();

where the form is

<form id="myform" action="whatever.php" method="post"></form>

But be careful as I had issues for ages with variables/methods clashing. If you are using any buttons with the name submit then change this. It seems to be that

document.forms["myform"].submit();

clashes with

<input name="submit" type="submit" value="value">

This solved by simply changing the name to something else

User Avatar

Wiki User

14y ago

What else can I help you with?

Related Questions

Do you need java compiler to execute HTML programs written in javascript?

No, Java and JavaScript are nothing to do with each other, JavaScript is a form of EMCAScript, not Java. Every modern browser comes with a JavaScript engine that is used to understand JavaScript. so there is no need for it, no.


How do you transfer values from javascript to JSP?

You can set the value in the hidden form fields using javascript and access the form fields in JSP


How does one submit a form using JavaScript?

You can submit a form with Javascript by using certain code which allows you to firstly create a form then nest this with a button that will submit when, for example, a user clicks on it.


Can you use JavaScript within the form tag?

You can call an external javascript file or javascript code located inside the head or body tag from a form using event handlers. I am not sure if you can or cannot use javascript code inside form tags but am sure that it is not a good programming practise to put code of two different language (js &amp; html) together


What is the uses of getelementbyid in javascript?

ID is unique and there can be no duplicate in concerned file atleast. When you specify the document.getElementById command then that means javascript only calls that element. Say suppose you want to call a radiobox of name gender where the name gender is associated with two form elements. Here you specify two different ID's and call them through javascript


What is the simplest way to validate a users email address in a form?

JAVASCRIPT!


What does it mean to execute?

It has two meanings:To do or perform. "Execute the Colonel's order." or "The lawyer asked us to execute the wills."To kill as a form of punishment. "The prisoners were executed by a firing squad."


How do you create a registration form using css and javascript in HTML?

Form is an HTML construct. The first part tells the server to Get or Post. To format with CSS is one thing, to make it interactive, use JavaScript. I will give a URL below:


How does form validation differ in JavaScript and PHP?

In JavaScript the validation is done client side, which means it can be easily bypassed by turning JavaScript off in your browser. But with PHP it is server side, which means you can't switch it off, so you can't bypass the validation.


What is the general form for the JavaScript statement used to assign a value to a text box object within a form?

document.formname.textfieldname.value = variable_or_literal


What are the benefits of using JavaScript for forms?

JavaScript can help with dynamic retrieval of form data using AJAX and also the data can be checked and validated before sending it to the server. Apart from that you could add some animation and change views using javascript and jquery.


Is javascript a form of HTML used to add dynamic capabilities and interactivity to webpages?

Javascript is a language used WITH HTML. It is not HTML. HTML is a markup language used to delineate between different types of data. JavaScript is a programming language, containing logic, functions, and object.