Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expected Identifier - IE8 Issue with user.js #2

Open
jasonflaherty opened this issue Mar 5, 2013 · 3 comments
Open

Expected Identifier - IE8 Issue with user.js #2

jasonflaherty opened this issue Mar 5, 2013 · 3 comments

Comments

@jasonflaherty
Copy link

I have been trying out the simple user registration and ran into the error with a login:

Expected Identifier
user.js Line: 21
Code: 0 Char:12

The demo setup shows this error also. I have been looking into a fix, but haven't found one yet.

FYI. Thanks for a great simple system!

@jasonflaherty
Copy link
Author

I am not sure if this is a "fix", but I get a different error down the script when I add this to change how Line: 21 is showing:

    markInvalid: function(input, reason) {
    var classes = "";
    var c = "class"; 
    if(input.c) { classes = input.getAttribute("class"); }

I guess IE reserves the word class, so the var c solves that?

The next error that shows is:

Expected Identifier, string or number
Line: 201 Char:30

add(form, make("label", {for: "usered_username", innerHTML: "user name"}));

I don't see any additional commas or quotes or anything... Not sure about this one. However, if I take out the "FOR" the error subsides...

add(form, make("label", {innerHTML: "user name"}));

IE8 will still not allow the user to enter the folder where the "secure" content is being held.

Maybe not issue, since IE8 is phasing out, but thought I'd share.

@Pomax
Copy link
Owner

Pomax commented Mar 12, 2013

yeah, the problem is the reserved keyword "class", which should be a quoted property access rather than direct access. I'll fix this later today, thanks for pointing it out!

So, rather than what you did, if(input["class"]) { ... } -- your solution actually looks for a property called "c" on the input element, which it won't find, so the code in the conditional block won't run.

@Pomax
Copy link
Owner

Pomax commented Mar 12, 2013

6227574 and 5df1a71 should have fixed this issue, let me know if you're still experiencing problems with the updated code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants