C1 widget method - type conversion problem of parameter value

Originally Posted 12 May 2014, 2:21 am EST

  • Originally Posted 12 May 2014, 2:21 am EST

    HI

    The integer object have no indexOf() method, when I set height of C1 Control and pass the integer value, the error occurred :

          $(C1Dialog1).c1dialog("option", "height", Number(iHeight) - 40);


    In runtime, scriptsource.axd, 'Microsoft JScript: Object does not support property or method' occurred :

            c1dialog.prototype._trimPx = function (key, value) {
    var idx;
    if(value) {
    idx = value.indexOf("px");
    if(idx !== -1) {
    this.options[key] = value.substring(0, idx);
    }

    }
    };

    Maybe C1 wijmo control could convert value to string internally.
    Yes, call String(...) explicitly will solve the problem.

    Best regards

    Chris
  • Marked as Answer

    Reply

    Hello Chris,

    The error occurs because the client side height property takes the value as string and you can refer to the following link for more details:
    http://wijmo.com/docs/wijmo/#Wijmo~wijmo.dialog.wijdialog.options~height.html

    Regards
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels