Aptana Studio 3 Eclipse plugin javascript code completion

0

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?

Kyle

Posted 2012-08-19T15:16:49.623

Reputation: 249

Answers

2

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

Scott

Posted 2012-08-19T15:16:49.623

Reputation: 21