Home>
Content

JAVASCRIPT shows the object size as an array
I am writing a code to display at a magnification.

Problem

CHROME works, but IE has an error.
In the process of fetching list elements as a variable,
Is there a way to work with IE?

SCRIPT5009: 'w' is not defined.
var mag = [[45, 30, 1], [60, 40, 0.75], [90, 60, 0.5], [135, 90, 0.33], [ 200, 133, 0.225], [300, 200, 0.15], [450, 300, 0.1]];
var magg = 0;
        function smallView () {
            obj = parent.frm_a01b.lenz;
            if (magg>0) {magg = magg-1;};
            [w, h, m] = mag [magg];
            $(obj) .css ('width', w + 'px');
            $(obj) .css ('height', h + 'px');
            obj = parent.frm_a01b.myresult;
            $(obj) .css ('zoom', m);
            $(obj) .css ('width', parseInt (w * 13.3) + 'px');
            $(obj) .css ('height', parseInt (h * 13.3) + 'px');
        }