I have recently decided to use eclipse for all/most of my coding. One of the things I want to work on is Websites with css and javascript.

I installed the Aptana studio 3 plugin as it seems like it has a fairly complete set of features. However, I cannot get code completion to work even for the simplest project. Inside my html,

<script type="text/javascript>

    function myFunc(){
    document.getElementByID("test").innerHTML="some text";         


I have a button to call that function and place it in a paragraph.

the code completion does not work, does not show that getElementByID is a valid method, AND when I view the site, the functionality doesn't work either.

The weird thing is, if I copy and paste from the first example on W3Schools' javascript tutorial, it DOES work, and even lets me type and add new functions WITH code completion.

What is going on?


The problem is that javascript is CASE SENSITIVE and ID should have a small d

so, your code inside the function should be: document.getElementById("test").innerHTML="some text";

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.