Use this JavaScript code in footer and update 21st line with number of selections and 23rd with pop-up message
var nos=0;
function SSI_CustomGraphicalCheckbox(GraphicalCheckboxObj, InputObj, blnCheck)
{
var id=InputObj.id;
var id1=InputObj.id.split("_")[1];
var other=$("#"+id).closest('div.input_cell').next().find(".open_end_text_box").attr("id");
if(blnCheck==false && other)
{
$('#'+other).removeClass("x");
$('#'+other).val("");
}
//var ind1=ar1.indexOf(id1);
if(blnCheck==true)
{
nos++;
}
if(blnCheck==false)
{
nos--;
}
if(nos>=2)
{
var msg = 'Your error message goes here.';
var div = $("<div>" + msg + "</div>");
div.dialog({
width: 500,
height:'auto',
modal: true,
closeOnEscape: false,
resizable: false,
draggable: false,
title: "Confirm",
buttons: [
{
text: "Yes",
click: function ()
{
div.dialog("close");
}
},
{
text: "No",
click: function ()
{
div.dialog("close");
}
}
]
});
}
}