...

View Full Version : "Error: Please enable Javascript" - but it IS enabled!!



Naru
07-21-2010, 10:07 PM
Hi,

a friend of mine has a problem on several (German) Legend of the Green Dragon (lotgd) servers.

Sometimes, mostly after she has loged in and out for a few times during a day, she suddenly gets the message that Javascript must be enabled to log in. But it definetely IS enabled - otherwise she'd never be loged in!

The error occurs
- on 2 different PCs
- with 2 different internet providers
- with IE, FF and Opera
- only on lotgd servers - any other page using Javescript are working fine

We
- updated and downgraded Javascript
- disabled and/or uninstalled all antivirus and firewall programms
- cleaned cache with CCleaner
- disabled browser add ons
- reinstalled Windows
- disabled auto-insert passwords

Even a reboot doesn't change anything. Sometimes, when she waits a few hours, she can log in again. Sometimes the error doesn't occur for days, sometimes it's there every day.
That's why it is so strange. Although she doesn't change anything, the error comes and goes completely irregular.

The games' admins can't or don't want to help, they say that she's the only one with that problem and that it's not a mistake in the script.

What might occur that error? And what can we do to stop it??

That's what the Opera error console says:

JavaScript - http://lotgd.demonstone.org/index.php
Inline script compilation
Syntax error at line 21 while loading:
b|(~d)),a,b,x,s,t);}*/
--------------------^
expected expression, got '*'
CSS - http://lotgd.demonstone.org/templates/yarbrough.css
Linked-in stylesheet
xbackground-color is an unknown property
Line 1:
eight:auto;padding:1px;line-height:18px;float:left;clear:none;xbackground-color:
--------------------------------------------------------------------------------^
JavaScript - http://lotgd.demonstone.org/index.php
Inline script compilation
Syntax error at line 21 while loading:
b|(~d)),a,b,x,s,t);}*/
--------------------^
expected expression, got '*'
JavaScript - http://lotgd.demonstone.org/index.php

Uncaught exception: ReferenceError: Undefined variable: calcMD5
Error thrown at line 1, column 0 in <anonymous function>(event):
document.forms.loginform .hidden_pw.value = calcMD5(document.forms.loginform .password.value);
JavaScript - http://lotgd.demonstone.org/index.php
Inline script compilation
Syntax error at line 21 while loading:
b|(~d)),a,b,x,s,t);}*/
--------------------^
expected expression, got '*'
JavaScript - http://lotgd.demonstone.org/index.php

Uncaught exception: ReferenceError: Undefined variable: calcMD5
Error thrown at line 1, column 0 in <anonymous function>(event):
document.forms.loginform .hidden_pw.value = calcMD5(document.forms.loginform .password.value);
JavaScript - http://lotgd.demonstone.org/index.php
Inline script compilation
Syntax error at line 21 while loading:
b|(~d)),a,b,x,s,t);}*/
--------------------^
expected expression, got '*'
JavaScript - http://lotgd.demonstone.org/index.php

Uncaught exception: ReferenceError: Undefined variable: calcMD5
Error thrown at line 1, column 0 in <anonymous function>(event):
document.forms.loginform .hidden_pw.value = calcMD5(document.forms.loginform .password.value);
JavaScript - http://lotgd.demonstone.org/index.php
Inline script compilation
Syntax error at line 21 while loading:
b|(~d)),a,b,x,s,t);}*/
--------------------^
expected expression, got '*'


I hope someone is able to help. Thank you!

Old Pedant
07-22-2010, 02:12 AM
Don't think we can help. The owners of those servers will have to fix their clearly buggy JavaScript code.

Though looking at that index.php page using Firefox and FireBug, I can't see any of those errors.

Rowsdower!
07-22-2010, 05:15 PM
Why are they bothering to hash the password on the client side? This seems to be the problem, because if I (...still have javascript disabled and...) use firebug to change hidden_pw to type of "text" and manually enter even a single character, leave the password field blank, and enter text in the "name" field - then click on submit - I don't get any "javascript must be enabled" message. I just get a message that my login details were incorrect. For the javascript message the server is only checking to see that there IS a value for "name" and that there ISN'T a value for "password." If any value is entered for "name" then "password" must be blank or the message about javascript is displayed. The "hidden_pw" field can be blank or loaded with text and either way it won't affect the javascript message.

As for why this is failing... At some point the script is failing to wipe out the value of "password." It may or may not also fail to assign a value to "hidden_pw" (which would make the login fail but would not display the javascript warning - without having a valid login to test with I wouldn't know).

Why is it doing that? I have no clue. The page logs keystroke events (for a login shortcut key or something? I haven't reviewed it that closely) but firefox throws a warning for each key press. Maybe all of that is causing a problem. Or maybe the google api scripts are conflicting. Something is apparently "crashing" the javascript, which prevents the login md5 hash from running and clearing out the regular password field, which gets you an error message in the page.

Fixing this would be a waste of time in my opinion. Client-side validation of input format is OK. But if I were you, I would recommend that my friend switch all of his credential manipulation activities to the server side and then you won't have this problem. Whatever purpose this login gymnastics serves should be solved elsewhere. There is nothing about this script that couldn't be handled on the server side without any fuss at all.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum