We all have to start somewhere when learning something new but this forum expects you do your part in learning the basics of whatever technology you're working with. After you have done research into the topic, and if at this point you have a question about something you don't understand, that's when you should post your question.
When someone post a bunch of stuff that is so obviously wrong to anyone who has even a very basic understanding of any technology (in this case JavaScript) it's frustrating. I mean, why wouldn't it be frustrating? The person who's doing the answering has to put more effort into explaining what's wrong than they should have to....to someone who hasn't put any effort into trying to figure out what's wrong for themselves. This insult isn't apparent to first time posters or people who are very new to a technology. You don't usually make this realization until you have answered hundreds (or thousands) of questions.
Anyways, enough about forum ethics and on to helping you find tutorials so that you can learn the basics so that we can help you out!
In the JavaScript forum there is a "sticky" post at the very top of the form that contains links that are helpful in learning the basics of JavaScript to get you started (it's "stickied" to the top so that you can always see this post when you first come to the JavaScript answers forum).
Since I don't think you saw this sticky post, here is a link to it:
Offsite Links. Here on bytes there are also a number of articles written by experts, members, and moderators that can further help you with a topic. You can view these articles in the
JavaScript Insights section.
Cheers!
-Frinny