0

I hate sharing my code, but I don't have any other option. I tried everything to prevent it, but I need to find out what's wrong about it.
http://pastebin.com/zMjne7P0

User focusses out input field (line 83)(I tried inputting ";" for tests, which should return error, as it's invalid name). And the entire big function executes well, it understands that the field is not empty, so it just goes on, it notices that it's not alphanumeric. And here's the problem. Line 71 doesn't get executed, the if (isFirstError) {} is considered a true statement (like it should). And it should execute everything function within, so it kinda "does", except I see no effect whatsoever, the opacity is still 0 and I haven't seen it even flikker in browser.

Regardless of existence of lines 30 and 31, the problem is still there.

The only error (warning) I get is:
navigator.battery is deprecated. Use navigator.getBattery() instead. index.js:50 wtf?

3
Contributors
8
Replies
105
Views
1 Year
Discussion Span
Last Post by diafol
1

I hate sharing my code

Why? If you want help, it.s what you have to do. You want free help instead of paying a pro for it so, that.s the way the cookie crumbles. If you want protection, hire a pro. Sorry if that sounds dismissive, but this site is all about sharing. Threads are posted for the benefit of all, not just the OP. I.ll have a look in a little while.

Votes + Comments
You misunderstood me. You're absolutely right, but it's not what I meant.
0

Hello Aeonix as I can see you already use jQuery so what is the point of all these : document.getElementById , *.style.opacity ?

0

I have seen somewhere that document.getElementById("xyz") by pure JavaScript is about 3 times faster than having $("#xyz"). I'm not certain on validity. But it doesn't hurt anybody if I do it this way, on top of it, it's easier for me, as I see exactly what this does instead of looking for # and ..

0

Just had a look. As your js refers to many dom elements, it's a little bit difficult to make sense of it. Including the HTML markup would be useful, e.g. in a jsfiddle. We could then use a (non-)working environment to test, or failing that, just paste the html in this thread.

In addition:
The index.js file refered to, I'm assuming, is nothing to do with your script. navigator.getBattery() should be used these days to get the system battery info: https://developer.mozilla.org/en-US/docs/Web/API/Navigator/getBattery

If you have an upstream js error, then subsequent js execution may be halted. I don't believe that using a deprecated method should halt execution though (hence - "warning"), BUT, deprecated usually means, "removed in future", so it would be wise to investigate the new way of doing things.

0

The index.js file refered to, I'm assuming, is nothing to do with your script. navigator.getBattery() should be used these days to get the system battery info: https://developer.mozilla.org/en-US/docs/Web/API/Navigator/getBattery

The thing is, I don't use Navigator or getBattery or getBattery() at all. I don't know why it's ever there. If you look at the JS file you will notice there's no such command at all.

Just had a look. As your js refers to many dom elements, it's a little bit difficult to make sense of it.

(weeps)
http://s000.tinyupload.com/index.php?file_id=05490825331841135346
The password is obtain @nd code.com together (look at the red text only).
Click on the green name. It's the download link.
This is entire project source-file. There is no database connection required per-se.
The thing that you look for is the email field in Authorization dropdown, and the
second thing is opacity: 0-hidden span that has red text. The line that I pointed
out in my first post, well, that's the one that doesn't seem to work. No errors, no obtrustions,
no missing references, it just doesn't do this, breakpoint stops on animate({}), then it
just couple times around jquery library and it passes on while doing nothing.

Edited by Aeonix

0

Ok. I.ll give it a look tomorrow. Getting late here.

0

Haven't forgotten - but js taking a while to untangle. Mix of js and jq and repeats.

0

Tried this for index.js:

http://pastebin.com/MMxhAY2A

Not sure if it matches what you need. I didn't understand opacity - when I checked css, there was no background attached to the div.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.