$("[name=form_1]").each(function(){ alert("i in else"+i); $('.eform_text').each(function() { }); });
whether this cycle will be repeated over all elements that have the eform_text class only in form1. Or will it iterate over all elements having this class?
Update:
The exact jsp code is as follows:
<c:when test="${eformDetails.controlType==1}"> <input id="textBox_${eformDetails.id}_${eformDetails.required}_${i}" class="eformDetail eform_text" type="text" value="" name="form_${i}" onblur="validateEformInputs(${i-1})"></input> </c:when>
I have a form that changes every time. And for each form I need to get all the text fields. Currently, after your help, my javascript looks like this:
$ ("[name = form _" + i + "]"). Each (function (s) {alert ("i in else" + i);
$('.eform_text', this).each(function() { textboxId = $(this).attr("id");
He reaches the first warning, but I cannot reach the second cycle. It does not receive elements that have the eform_text class. Not sure what is going on here. Could you help me?
source share