Do you have two different forms on your page, or is it one form with an id of 'testform' and a class of 'uplform'? Your code says you want to look at the inputs in the #testform, but your email says you want to look at the inputs belonging to form.uplform. If they're the same form, you can do
$(this).children('input').each(... or $(this).find('input').each(... Next step would be to test the results of just that query, by something like alert($(this).children('input').length); or alert($(this).find('input').length); If that has a length, the .each(fn) should work just fine. - Richard On Wed, Oct 21, 2009 at 2:36 AM, j...@creatusadvertising.com < susanprob...@goalattained.com> wrote: > > Hi! > > I have this code: > > > $("form.uplform").live('submit', function(){ > if($(this).attr('validate')=='true'){ > $("#testform>input").each(function(){ > alert($(this).attr('name')); > }); > } > return false; > }); > > > What I'm trying to achieve is alert all the name attributes of all > input boxes belonging to form.uploform but this does not seem to > happen. although i did get past if validate==true thing.. > > Please tell me what i am doing wrong.. > > Thanks in advance >