Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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";         
    }

</script>

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?

share|improve this question

1 Answer 1

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";

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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