Cloud Development Kit

Myscript integration in Asp.net mvc application

Hi,

I tried to integrate myscript js in a asp.net core mvc application. Followed the readme in this https://github.com/MyScript/MyScriptJS

I am getting the following error "MyScript.register is not a function"

Html content

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Home Page - WebApplication1</title>
   
        <link rel="stylesheet" href="/lib/bootstrap/dist/css/bootstrap.css" />
        <link rel="stylesheet" href="/css/site.css" />
        <link rel="stylesheet" href="/lib/myscript/dist/myscript.min.css" />
       
        <script src="/lib/q/q.js"></script>
        <script src="/lib/cryptojslib/components/core.js"></script>
        <script src="/lib/cryptojslib/components/hmac.js"></script>
        <script src="/lib/pepjs/dist/pep.js"></script>
        <script src="/lib/myscript/dist/myscript.js"></script>
</head>
<body>
    <nav class="navbar navbar-inverse navbar-fixed-top">
        <div class="container">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="/">WebApplication1</a>
            </div>
            <div class="navbar-collapse collapse">
                <ul class="nav navbar-nav">
                    <li><a href="/">Home</a></li>
                    <li><a href="/Home/About">About</a></li>
                    <li><a href="/Home/Contact">Contact</a></li>
                </ul>
            </div>
        </div>
    </nav>
    <div class="container body-content">
       
<div id="editor"></div>
<script>
    var editorElement = document.getElementById('editor');

    MyScript.register(editorElement, {
        triggers: {
            exportContent: 'QUIET_PERIOD'
        },
        recognitionParams: {
            type: 'TEXT',
            protocol: 'REST',
            apiVersion: 'V3',
            server: {
                scheme: 'https',
                host: 'cloud.myscript.com',
                applicationKey: 'XXXXXXXXX',
                hmacKey: 'XXXXXXXXX'
            }
        }
    });

</script>
        <hr />
        <footer>
            <p>&copy; 2017 - WebApplication1</p>
        </footer>
    </div>   
        <script src="/lib/jquery/dist/jquery.js"></script>
        <script src="/lib/bootstrap/dist/js/bootstrap.js"></script>
        <script src="/js/site.js?v=EWaMeWsJBYWmL2g_KkgXZQ5nPe-a3Ichp0LEgzXczKo"></script
</body>
</html>

Thanks

Kumaran


Dear Kumaran,

Can you please try to replace <script src="/lib/myscript/dist/myscript.js"></script> by <script src="/lib/myscript/dist/myscript.min.js"></script> ?

Let us know if this doesn't work.

Best regards,

Olivier
Olivier,

I was referring min.js earlier. To exactly know the issue, i linked myscript.js The issue remains same with both versions

Thanks
Kumaran

 

Dedar Kumaran,


can you please do again a bower update?


Best regards,

Olivier
Login or Signup to post a comment