validate number of textarea

Javascript coding ..

Moderators: macek, egami, gesf

lvidya
New php-forum User
New php-forum User
Posts: 37
Joined: Wed Jun 20, 2012 3:20 am

validate number of textarea

Postby lvidya » Wed Jun 27, 2012 1:18 am

$("[name=saveAnswer]").click(function() {

var inputs = document.getElementsByTagName("textarea");
var length=inputs.length;
var i;
for(i=0; i<length; i++)
{
//Validate

}

});

Plz help in number of textareas

User avatar
Nullsig
php-forum Fan User
php-forum Fan User
Posts: 981
Joined: Thu Feb 17, 2011 6:52 am
Location: Racine, WI

Re: validate number of textarea

Postby Nullsig » Wed Jun 27, 2012 6:11 am

if(inputs[i].value == ''){
alert('One or more text box is not filled in');
}


Return to “JavaScript”

Who is online

Users browsing this forum: No registered users and 1 guest

cron