1

I've got a problem with running java applet in MVC 4 application. Same applet works fine in Web Forms app. Code which is working in Web Forms:

 function initApplet() {
        var attributes = {
            id: "appletId",
            code: 'appletCode',
            archive: 'appletArchive.jar',
            width: 1,
            height: 1
        };
        var parameters = {
            jnlp_href: 'APPLICATION.jnlp', codebase_lookup: value = false
        };
        var version = '1.6';
        if (deployJava != null) {
            deployJava.runApplet(attributes, parameters, version);
        }
    }

Same code in MVC which is not working:

 function initApplet() {
        var attributes = {
            id:         "appletId",
            code: "appletCode",
            archive: '@Url.Content("~/Content/appletArchive.jar")',
            width:      1,
            height:     1
        };
        var parameters = {
            jnlp_href: '@Url.Content("~/Content/APPLICATION.jnlp")', codebase_lookup: value = false
        };
    var version = '1.6';
    if (deployJava != null) {
            deployJava.runApplet(attributes, parameters, version);
        }
    }

Code which is calling applet method:

 document.getElementById("someId").value = appletId.appletMethod();

Error which I'm getting is "Object doesn't support property or method 'appletMethod'"

Thanks in advance for any help!

0 Answers0