?
Solved

JavaScript in Eclipse

Posted on 2013-01-21
4
Medium Priority
?
490 Views
Last Modified: 2013-01-22
I'm learning JavaScript.  I've written PHP using Eclipse and I like Eclipse.  But when I create a JavaScript project in Eclipse, and enter some code, it shows all the HTML in the code as errors.  What am I doing wrong?
0
Comment
Question by:anAppBuilder
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 30

Accepted Solution

by:
IanTh earned 2000 total points
ID: 38804158
thats the way elipse works isn't it the errors are probably because your JavaScript is not an html page
0
 

Author Comment

by:anAppBuilder
ID: 38804180
Thank you, Ian.
But the problem persists even if I change the extension to . html.
0
 
LVL 30

Expert Comment

by:IanTh
ID: 38804203
please show me the errors
0
 

Author Comment

by:anAppBuilder
ID: 38808176
Thank you, Ian.  That got me going in the right direction.  

It turns out it's kind of interesting, as I discovered when I set out to clearly show the errors.  If you start out with the extension .html, all is well.  If you start out with .js and then rename it to .html, some errors remain.

In Eclipse Indigo, I created a .js and a .html and pasted a very simple Javascript example from this page http://www.w3schools.com/js/default.asp into each of them.

Many errors in the .js
     Renaming to .html does not remove the errors
     Select all, cut, then paste back into the same file removes all errors but one.  It wants to delete the < on the closing </html>
     Select all, cut, then paste back into a new .html file removes all errors
No errors in the .html.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question