4

I'm using Jquery Masked input plugin http://digitalbush.com/projects/masked-input-plugin/

According to the changelog it should support IE7

When when trying to use it on IE7 It's does not work and I'm getting the following error in IE debugger

Object doesn't support property or method 'mask'

My code :

$("#" + "someid").mask(someformat);

The same code work on all other browsers including IE8 and above.

john Smith
  • 1,565
  • 7
  • 34
  • 54

2 Answers2

3

For IE7 try to use version 1.2.2 of masked-input https://zk-sample-code.googlecode.com/svn-history/r27/trunk/WebContent/samples/sam/inputbox/js/jquery.maskedinput-1.2.2.js

$(function () {
   $("[name='in1']").mask("99/99/9999");
   $("[name='in2']").mask("99-99-99");  
});

example: http://jsfiddle.net/ishubin/aVwpn/

Ihor Shubin
  • 10,628
  • 3
  • 25
  • 33
2

Error in script jquery.maskedinput.js!

now:

$.mask = {
    //Predefined character definitions
    definitions: {
        '9': "[0-9]",
        'a': "[A-Za-z]",
        '*': "[A-Za-z0-9]"
    },
    dataName: "rawMaskFn",
    placeholder: '_',
};

need:

$.mask = {
    //Predefined character definitions
    definitions: {
        '9': "[0-9]",
        'a': "[A-Za-z]",
        '*': "[A-Za-z0-9]"
    },
    dataName: "rawMaskFn",
    placeholder: '_'
};

work on IE7!

Yuriy
  • 21
  • 1