Đã hoàn thành

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");}


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 nhiều hơn: test a javascript, substring c, substring 0 2, q email, c substring, mm_validateform radio button, max p, javascript max, val , c deve, ready javascript, javascript document ready, form radio, document ready javascript, max elements, button javascript, javascript forms, javascript ready, javascript alert form, email validate, contain javascript, substring, asp form email, email asp form, min max

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

ID dự án: #1613649

Được trao cho:


I can done. Please check PM and my review.

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

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


Javascript expert! Ready to start now.

$30 USD trong 0 ngày
(16 Nhận xét)

Lets Start! your java validation.

$30 USD trong 0 ngày
(3 Nhận xét)

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ận xét)