Ankit  Shukla

Ankit Shukla

  • NA
  • 681
  • 116.1k

Show result using JQUERY in MVC

Nov 5 2015 4:45 AM
Hello;
 
I have a jquery code for counting correct answers from all questions like this: 
 
$(this).find("QUESTION").each(function(){
var quesText = $(this).find("NAME").text();
var quesType = $(this).attr("TYPE");
var options = new Array();
var correctAnswer = new Array(), correctAnswerCounter = 0;
if(quesType != "SA" || quesType != "SUBJECTIVE" || quesType != "COMPREHENSION@@SA"){
var optCounter = 0;
$(this).find("ANSWER").each(function(){
options[optCounter] = $(this).text();
optCounter++;
if($(this).attr('CORRECT')=='TRUE'){
correctAnswer[correctAnswerCounter] = $(this).attr('VALUE');
correctAnswerCounter++;
}
});
}
 
Please tell me how to show result on button click event in MVC?
 
                   Thank You in Advance! 

Answers (3)