This is my code on my Client Template
column.Bound(c => c.DeclarationsSigned)
.ClientTemplate(
"# if(DeclarationsSigned) { #" +
"# if(DeclarationsSignedByAssessor) { #" +
"<label style='color:red;'>Yes</label>" +
"# }else {#" +
"<label style='color:green;'>Yes</label>" +
"# } #"+
"# } else { #" +
"<label style='color:red;' >No</label>" +
//"< a href = 'javascript: void(0)' title = 'Signed Declaration' class = 'grid-action-inline' onclick =\" signOffDeclaration(<#=ProgramAssignmentId#>,<#=LearnerFullName#>)\"><span class='glyphicons glyphicons-pencil'></span></a>" +
"<a href='javascript: void(0)' class = 'grid-action-inline' title = 'Signed Declaration' onclick = 'signOffDeclaration(#= ProgramAssignmentId # , #= LearnerFullName #)'><span class = 'glyphicons glyphicons-pencil' ></span></a>" +
"# } #").Width(50);
And this is my function
function signOffDeclaration(AssignentId,LearnerFullName) {
if (!confirm("I declare that I have a hard-copy of the declaration document signed by {learner name} for {programme}. I will upload this into the POE folder.")) {
return;
}
$.ajax({
type: "POST",
url : "/Home/AssessorHome/SignDeclarationOff",
data: { assignmentId: AssignentId },
datatype: "json",
sucess: function (data) {
console.log(data);
},
error: function (xhr, ajaxOptions, thrownError) {
console.log(xhr.responseText);
}
})
$("#LearnerListGrid").data("kendoGrid").dataSource.read();
}
i am getting this error when clicking a pencil Uncaught SyntaxError: missing ) after argument list
how do i solve this error