How can i compare values for same index for each of these input text and select control array ?
var qtype_array = new Array();
$('select[name="qtype[]"]').each(function(){
qtype_array.push($(this).val());
});
var true_ans_array = new Array();
$('input[name="true_ans[]"]').each(function(){
true_ans_array.push($(this).val().toUpperCase());
});
ARRAY CONTENTS :
qtype_array - ["MULTIPLE", "SINGLE","DESC"]
true_ans_array - ["AC", "A", ""]
I want to check that if in qtype_array at index 0 if the text is "MULTIPLE" then at the same index 0 of true_ans_array the text should be minimum 2 characters and if the text in qtype_array is "SINGLE" the length of text contents in true_ans_array at same index should be 1 , and if in qtype_array if the text is "DESC" the length of text contents in true_ans_array should be 0.
I am developing a Online Exam System.
I am badly stuck and cant think of the solution.....