summaryrefslogtreecommitdiff
path: root/testapp/static/exam/js/show_question.js
blob: e3ed1cc5db482260b7af20a3da027fbb2636d94c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
function confirm_delete(frm)
{
    var n=0;
    for (var i =0;i<frm.question.length;i++)
    {   
		if (frm.question[i].checked == false)
			n = n + 1 ;
	}
    if(n==frm.question.length)
    {
        alert("Please Select at least one Question");
        return false;
    }
    var r = confirm("Are you Sure ?");
	if(r==false)
	{  
		for(i=0;i<frm.question.length;i++)
		{
			frm.question[i].checked=false;
		}
        return false;
	}
}
function confirm_edit(frm)
{
    var n = 0;
    for (var i =0;i<frm.question.length;i++)
	{
		if (frm.question[i].checked == false)
			n = n + 1 ;
	}
	if(n == frm.question.length)
    {
        alert("Please Select at least one Question");
	    return false;
    }
    else
        return true;
}