Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.
I have a cancel_complaints page in ASP in which list of complaints r coming (2 records come at a time means page navigation).In that page some information is coming in table and i have given a checkbox in one Table column according to records in database table rows are generated.That is multiple checkbox are generated with same name.I have put a validation that if user has selecetd none of checkbox alert message comes.Problem is that when there are more than one row validation is going fine but when only one row remains validation does not goes fine.Below i am giving javascript function that i have used for validation.----------function------------function validatefield(){ var j=0; var lenvar=document.cancel_complaints.chksel.length; //alert(eval(lenvar)); for (i = 0; i < lenvar; i++) {if(document.cancel_complaints.chksel[i].checked) { j=j+1; } } if(j==0) { alert("Please select atleast one checkbox"); return false; } else { return true; document.cancel_complaints.submit(); }}----------in case of one row(i.e only one record i.e only one checkbox) the value of lenvar is undefined and if there are more than one row the value of lenvar comes= (no of checkboxes)i am unable to understand why there is problwm in counting in total no of checkboxes.if somebody has solution then plz tell me.thanks in advance
Profile Answers by kshivani Questions by kshivani
Questions by kshivani
Related Answered Questions
Related Open Questions