- This topic has 4 replies, 2 voices, and was last updated 19 years, 8 months ago by Riyad Kalla.
-
AuthorPosts
-
pholisterMemberAfter testing a jsp, I went to add a few comments and inadvertantly deleted an opening brace in a javascript function…
Even after putting this little javascript function in its own .js file, myeclipse did not report an error.. by leaving off one opening brace, the code closes off the function, and leaves a couple of statements dangling with the original closing brace..that should definitely trigger a syntax error,right?
my question’s are
1) is the JSP editor not javascript aware (it seems to only notice the html script tag)
2) is the javascript editor just highlighting keywords and nothing more?
3) what is the ‘best practices’ for avoiding this kind of issue (ie. javascript bugs).<script> function exec_form( frm, reqAction ) { if (reqAction == "test") { frm.dotest.value="go"; frm.DFS__Step.value = 2; } if (reqAction == 'cancel') // brace missing window.close(); return false; } // to compiler/interpreter, this closes the fucntion frm.submit(); // next 3 statements are dangling return true; } //this should be syntax error </script>
pholisterMemberspaced on the env:
eclipse 3.0.1
myeclipse 3.8.4
jdk 1.4.2_04
win2k
Riyad KallaMemberpholister,
Currently the JavaScript editor provides syntax highlighting and autocomplete, real-time error (reconciler) checking is not part of the editor *yet*.
pholisterMemberrkalla,
I realize JSP parsing cannot be pretty.. your mixing several languages, 2 server side, 2 client side.. still, in an IDE, you get used to relying on the syntax/semantic checking, and if one of the languages is left out, it really is a shortcoming.
Is there a committed release/timeframe for javascript reconciling?
thx.
Riyad KallaMemberThere is not an ETA for this functionality right now, I appologize for the ‘fuzziness’.
-
AuthorPosts