Đang Thực Hiện

validate form with javascript

I need only to put a existent code to validate form, a option to validate code to radio button too.

The code is the known MM_validateForm from Dreamweavers behaviors. I don´t know why this code is not ready to radio button too. I have the join the two codes:

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

radioGroup = [url removed, login to view]["formulario"].elements["cidadeevento"];

validRadio = false;

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

validRadio = (validRadio || radioGroup[i].checked);

}

if (!validRadio) {alert("Você deve selecionar um dos dias do evento");}

and

function MM_validateForm() { //v4.0

var i,p,q,nm,test,num,min,max,errors='',args=[url removed, login to view];

for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=[url removed, login to view](args[i]);

if (val) { nm=[url removed, login to view]; if ((val=[url removed, login to view])!="") {

if ([url removed, login to view]('isEmail')!=-1) { p=[url removed, login to view]('@');

if (p<1 || p==(val.length-1)) errors+='- '+nm+' deve conter um endereço de email.\n';

} else if (test!='R') { num = parseFloat(val);

if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';

if ([url removed, login to view]('inRange') != -1) { p=[url removed, login to view](':');

min=[url removed, login to view](8,p); max=[url removed, login to view](p+1);

if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';

} } } else if ([url removed, login to view](0) == 'R') errors += '- '+nm+' é requerido.\n'; }

} if (errors ) alert('Os seguintes erros ocorreram:\n'+errors);

document.MM_returnValue = (errors == '');

} }

And the asnwer to the errors joined too. And obvious, the form only send if all are complete.

Kỹ năng: ASP, Javascript

Xem thêm: substring c, q email, c substring, max p, javascript max, val , c deve, ready javascript, form radio, max elements, javascript forms, javascript ready, javascript alert form, email validate, contain javascript, substring, asp form email, email asp form, min max, javascript send, email form javascript, validate form, test javascript, validate javascript form, validate asp forms

Về Bên Thuê:
( 8 nhận xét ) rio de janeiro, Brazil

Mã Dự Án: #1613649

Đã trao cho:

kultech

I can done. Please check PM and my review.

$30 USD trong 0 ngày
(19 Đánh Giá)
4.7

4 freelancer đang chào giá trung bình $30 cho công việc này

techfortune

Javascript expert! Ready to start now.

$30 USD trong 0 ngày
(16 Đánh Giá)
4.9
aukint

Lets Start! your java validation.

$30 USD trong 0 ngày
(3 Đánh Giá)
2.7
oasissoftwareinc

Hi, I have over 12 years of Experience in software design, development and implementation of various commercial applications in Client/Server environment, Web and ERP applications using C# 1.1/2.0/3.5, ASP.Net, VB.N Thêm

$30 USD trong 1 ngày
(0 Đánh Giá)
0.0