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.
All My Code Is Working Wonderfully Except This If Statement
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