First off, java and javascript are not the same animal. If you're not sure what I mean, read
Java is not Javascript. In this great article, Danny Goodman, author of
Javascript Bible, examines the differences between JavaScript vs. Java.
There are a lot of resources online for both java and javascript. I have listed here the ones I like best, and also some book recommendations. This is one area where I've found some books to be helpful. Learning by example is really useful, so I like to download sample code and see examples of how it works. Most of the tutorials on the web are good, but some of the sample code is crap, or doesn't work. Not all the sites offering sample code have working demos. Let me tell you, it's really frustrating trying to learn "what's it doing and why is it doing that?" and have sample code that doesn't work. You always assume you did something wrong, and you tear your hair out trying to figure out what... only to find out later it's a bug in the code you downloaded!