Board index   FAQ   Search  
Register  Login
Board index php forum :: HTML JavaScript

validate number of textarea

Javascript coding ..

Moderators: macek, egami, gesf

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++)



Plz help in number of textareas
New php-forum User
New php-forum User
Posts: 37
Joined: Wed Jun 20, 2012 3:20 am

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');
User avatar
php-forum Fan User
php-forum Fan User
Posts: 981
Joined: Thu Feb 17, 2011 6:52 am
Location: Racine, WI

Return to JavaScript

Who is online

Users browsing this forum: No registered users and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.