The resource is not on the build path of a javascript project
I just answered this for another question, very similar to yours.
You need to add the JavaScript "nature" to the project (basically, tell Eclipse to treat it as a JavaScript project). Right-click on the project and choose Configure > Convert to JavaScript Project....
After doing that you should see a Builder named "JavaScript Validator" and have the JavaScript section in the properties.