[jQuery] Re: How to validate form controls

2008-01-18 Thread Dan G. Switzer II

>i have 3 textboxes under . i would like to validate
>the Textbox ie textbox is empty.
>
>i have done validation  for each individual textbox by using their
>id,but i need coding for validate the TextBox using div id ie mydiv.

The following selector would return all the textboxes inside the mydiv div:

$("#mydiv textarea")

-Dan



[jQuery] Re: How to validate form controls

2008-01-18 Thread Feijó


try

if ($('.mydiv').val()) {
   // has values
} else {
   // don't has values
}

Feijó


--
From: <[EMAIL PROTECTED]>
Sent: Friday, January 18, 2008 3:24 AM
To: "jQuery (English)" 
Subject: [jQuery] How to validate form controls



Hi,

i have 3 textboxes under . i would like to validate
the Textbox ie textbox is empty.

i have done validation  for each individual textbox by using their
id,but i need coding for validate the TextBox using div id ie mydiv.


Waiting for your favourable reply,

karthik d.s