validate number of textarea

Javascript coding ..

Moderators: egami, macek, gesf

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

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: 979
Joined: Thu Feb 17, 2011 6:52 am
Location: Racine, WI

Wed Jun 27, 2012 6:11 am

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

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests