Web Form Javascript onsubmit check

The form submits an order.

Before submitting the form performs an onsubmit test.

for example <FORM NAME="form2" ONSUBMIT="return validateForm(form2)">

We have been using the script.


function validateForm (form) {

for (var e = 0; e < [url removed, login to view]; e++) {

var el = [url removed, login to view][e];

if ([url removed, login to view] == 'checkbox') {

var group = form[[url removed, login to view]];

if ([url removed, login to view]) {

var checked = false;

for (var r = 0; r < [url removed, login to view]; r++)

if ((checked = group[r].checked))


if (!checked) {

alert('You must first make a selection to Add to your Cart ');

[url removed, login to view]();

return false;





return true;



However recent changes to the forms submittal process means that the form can display one product type or both product types and therefore needs to check if any single checkbox is checked and noly then submit the form otherwise display the javascript alert.

Skills: ASP, Javascript

See more: javascript onsubmit check, javascript onsubmit, onsubmit check, onsubmit check form, check form javascript, javascript onsubmit return, form onsubmit check, javascript check form, onsubmit test, form check onsubmit, javascript onsubmit return false, onsubmit javascript, test onsubmit, onsubmit checkbox, check return onsubmit form javascript, javascipt onsubmit, onsubmitreturn javascript, onsubmit check length, web form onsubmit, onsubmit length, onsubmit form, check checkbox checked javascript onsubmit, javascript onsubmit length, javascript checkbox onsubmit, onsubmit return check

About the Employer:
( 5 reviews ) Oslo, Norway

Project ID: #243844

Awarded to:


lets start:)

$30 USD in 0 days
(51 Reviews)