You are here: Home » All Posts » Javascript Form Handling

Javascript Form Handling

Doing real-time calculations in a form using JavaScript

Javascript Form Handling

In this tutorial, we will learn how to perform calculations using JavaScript. It is quite often required to do calculations online in order forms, request quote forms and the like. This tutorial will show you how to use different form elements like drop-down list, radio button, check box and text box in a calculation. We […]

Read the full article →

Can JavaScript email a form?

Javascript Form Handling

NO! JavaScript can’t email a form! but, there are alternatives to send the form data to an email address. There is no direct method provided by JavaScript to send the data submitted in the form to an email address. The main concern for not providing a ‘JavaScript email form’ feature is security. Suppose there is […]

Read the full article →

How to Submit a Form Using JavaScript

Javascript Form Handling

Generally, a form is submitted when the user presses a submit button. However, sometimes, you may need to submit the form programmatically using JavaScript. JavaScript provides the form object that contains the submit() method. Use the ‘id’ of the form to get the form object. For example, if the name of your form is ‘myform’, […]

Read the full article →

Using JavaScript to reset or clear a form

Javascript Form Handling

Using an HTML ‘Reset’ button is an easy way to reset all form fields to their default values. For instance, the code snippet below shows an <input> field of type “reset”, which on being clicked resets all the form fields:

Read the full article →

Using JavaScript to access form objects when there are multiple forms

Javascript Form Handling

In order to access a form through JavaScript, we need to obtain a reference to the form object. One obvious way to approach, is to use the getElementById method. For instance, if we had a form with the id attribute “subscribe_frm”, we could access the form in this way: However, this approach has the limitation […]

Read the full article →

How to get the value of a form element : check box and radio button

Javascript Form Handling

This is the third article in the getting form element values using JavaScript series. In this article we will see how to get the value of check box and radio button. Getting a radio element and it’s checked value

Read the full article →

How to get the value of a form element : Drop downs and lists

Javascript Form Handling

This article is in continuation of getting form element values using JavaScript series. Drop down list

Read the full article →

How to get the value of a form element using JavaScript

Javascript Form Handling

Please refer article: how to get JavaScript form object for information on getting a reference to the form object. In this article we demonstrate the use of JavaScript for accessing the values of form elements. Later, we will demonstrate all the concepts using a real world example.

Read the full article →

How to set the value of a form field using Javascript PIII

Javascript Form Handling

This is in continuation of the previous article: How to set the value of a form field using JavaScript

Read the full article →

How to set the value of a form field using Javascript PII

Javascript Form Handling

This is in continuation of the article: set the value of a form element using Javascript. In this section, we will see how to set the value of other input fields like hidden field, drop down list etc

Read the full article →