Tutorial :datepicker doesn't work in ie7 [closed]



Question:

I have implemented a ui datepicker which works perfectly in FF but not in IE.

See here link try to click on the "Geboortedatum" field. What's going wrong?


Solution:1

here is your problem:

    //set the rules for the field names              rules: {                  firstname: {                      required: true,                      minlength: 2                  },                  surname: {                      required: true,                      minlength: 2                  },                                email:{                      required: true,                      email: true                  },                  password:{                      required: true                  }, <----- remove this comma !!!                },   

remove that comma above. also, if you put that block of code into http://jslint.com you will find out the same thing. IE does not like trailing commas like that in hashes, as others have pointed out


Solution:2

Line 76 - 78 in Ladosa.js:

password:{    required: true,  },  

should be

password:{    required: true  },  

At least that's what my IE is giving errors about.
Hope this helps you in the right direction.

EDIT (line 78, also in Ladosa.js)

rules: { //begin rules tag    ...      password:{      required: true    }, // <--- remove this comma also!    }, //end rules tag    messages: {      name: "Please enter your name",      email: "Please enter a valid email address"  },  

Be sure to check if all opening tags have closing tags, and when removing code in a function please be sure to remove everything...
Also if you INDENT (code laten inspringen) your code it is easier to spot the mistake.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »