"+strResult+" "; document.write(strResult);}
خرید بک لینک

Vote count: 0

Code in JSP File

$("[name='abcdchkbox']").bootstrapSwitch();
$("[name='abcdchkbox']").bootstrapSwitch.defaults.size='medium';
$("[name='abcdchkbox']").bootstrapSwitch.defaults.onColor='success';
$("[name='abcdchkbox']").bootstrapSwitch.defaults.onText='Present';
$("[name='abcdchkbox']").bootstrapSwitch.defaults.onText='Absent';

<c:forEach var="student" items="${studetail}" varStatus="count">
<span style="font-size:15px;">${student.fname}&nbsp;${student.lname}</span>
<input class="pacheck" id="check${count.count}" type="checkbox" name="abcdchkbox" value="${student.uname}" onChange="setvalue(${count.count},'${student.stuname}'">
<input type="hidden" name="absentstatus" id="hide${count.count}" value="">
</c:forEach>

I am fetching list of student from the database and placing a switch for present absent respective of each student. But from above mentioned code i am unable to fetch the value of the Switch when it is in off State.

I have tried

i have created an Input type hidden field with respective to each student with value null,and tried to provide the value to it when the switch tued off. So that i can cater the two different array one of present(Checked) and the hidden for Absent(Unchecked). But i am unable to call the function of the javascript by using onChange.

asked 26 secs ago

برچسب: نویسنده: استخدام کار تاريخ: شنبه 16 مرداد 1395 ساعت: 21:14

صفحه بندی