I have recently used the jSignature plugin in an ASP.NET Web Forms project successfully. I am trying to add the same functionality to a new MVC4 project. When I try to run the MCV view featuring the jQuery functionality, in debug mode, the following error is thrown from the jSignature.min.js file:
"Microsoft JScript runtime error: Canvas element does not support 2d context. jSignature cannot proceed."
Both the Web Forms project and the MVC4 project are running from the same client machine, both in debug mode, from the same instance of Visual Studio 2010.
I also note that in the MVC4 project, in the Error List, there are 50 messages which refer to variables defined in the jSignature.min.js file.
Example: Line 35, Column 56 - 'b' is already defined.
Can anyone advise what is causing this, and what I need to do to get jSignature to work in the MVC4 project?
HMTL Code from MVC View as follows:
@{
Layout = null;
}
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width" />
<title>jSigTest</title>
<script type="text/javascript" src="../../Scripts/jquery-1.7.1.js"></script>
<script type="text/javascript" src="../../Scripts/jSignature.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$("#SignatureDiv").jSignature();
});
</script>
</head>
<body>
<div>
This is a jSignature Test Page.
<div id="SignatureDiv">
</div>
</div>
</body>
</html>