Solved

JavaScript in Eclipse

Posted on 2013-01-21
4
467 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
  • 2
  • 2
4 Comments
 
LVL 30

Accepted Solution

by:
IanTh earned 500 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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

708 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now