I Am Running Into A Problem And Have Narrowed It Down To This Function, As You Can See I Have Tried To DeBug it (some remains are the commented out areas), But I Cannot Figure Out What Is Wrong, Thank You For Your Help!!
Aside from "True" should probably be "true" and the missing "}" for the end of the function and the stray ";" after the "}" at the end of the code, there aren't any glaring logic errors in the code. What is the problem?
You have several major problems. One is that you don't use the 'var' keyword, which is bad practice ALWAYS! You also need to learn how to use the semicolon, which is a statement completer, not used after blocks; you effectively have numerous empty statements by using ';' after blocks.
You also have an assignment rather than an equality test in your conditional block:
if ((EN = 'EN')....
is a common mistake. It has also been noted that boolean keywords 'true' and 'false' are all lowercase.
You would benefit strongly from using Douglas Crockford's JSLint to check your code, and to read his rules on good coding. JSLint would have caught all that and more.
I Did Not See That I Only Put One "=" In The If Statement, And I Am Still A Beginner with JavaScript, And Have Never Properly Learned A Programing Language (as in i have self thought my self through looking at other at code and using Google) So Any/All Advice Is Being Used.
All My Code Is Working Wonderfully Except This If Statement
When I Comment It Out It And Run lastcheck(); without checking for the file with JavaScript it Works Flawlessly, But When I include that if statement The whole code will not run, Mavigozler after i post this i will look up Douglas Crockford's JSLint On Google
EDIT:
I Have Also Added The "var" in front of the variables
Last edited by iGeekiHackiMatt; 07-23-2012 at 02:13 PM.
Reason: adding info
Bookmarks