{"id":7336,"date":"2005-01-04T13:01:00","date_gmt":"2005-01-04T13:01:00","guid":{"rendered":"https:\/\/www.htmlgoodies.com\/uncategorized\/javascript-primers-introduction\/"},"modified":"2021-04-23T20:13:33","modified_gmt":"2021-04-23T20:13:33","slug":"javascript-primers-introduction","status":"publish","type":"post","link":"https:\/\/www.htmlgoodies.com\/javascript\/javascript-primers-introduction\/","title":{"rendered":"JavaScript Primers – Introduction"},"content":{"rendered":"

and Andree Growney<\/font>
\n
\nUse these to jump around or read it all
\nWhy Now?<\/a> |
\n
My Co-Author<\/A> |
\n
How You Will Learn<\/a> |
\n
Primer Format<\/a><\/b>
\n<\/p>\n


\n
\n
Table of Contents<\/a><\/b>
\n
<\/p>\n

<\/p>\n

Welcome to the HTML Goodies JavaScript Primers! The purpose of these 30 lessons is to get you started writing your own JavaScript events. If you’ve tried to learn JavaScript through a book or from the Internet, my guess is that you found it quite difficult. Me, too. Learning JavaScript is literally learning a new language. The text may be English, but the construction of the sentences is quite different.<\/p>\n

<\/A>
\n



\nWhy Now?<\/b><\/font>

<\/p>\n

I<\/b><\/font> get e-mail all the time asking, “When are you going to put together a series of primers for writing JavaScript?” Most readers of HTML Goodies<\/I> know that I already have primers for HTML and for creating advertising banners. Why not JavaScript? Good question!

<\/p>\n

In an effort to put primers together, I bought the books, read them, read them again and gave up. JavaScript books, at least the four I read, are so dry and hard to follow. They’re textbooks. We all know how fun those are to bull through. So, I created a Java Goodies Web site. I figured that if I couldn’t teach you to make your own JavaScripts, then I would supply you with as many ready-made scripts as I could. Then maybe you wouldn’t need to write scripts. Well, it seemed like a smart idea at the time. Java Goodies had over 500 scripts (you can find them and over 2000 others at javascripts.com<\/a>) and you still want JavaScript Primers. I should have seen it coming.<\/p>\n

<\/A><\/p>\n


<\/p>\n

My Co-Author<\/b><\/font>

<\/p>\n

I<\/b><\/font> figured if I was going to do this correctly, I should have someone help me who knew what she was doing. Andree Growney is the Director of Instructional Technology Support Services and Webmaster at my university and is a bit of a wizard at this JavaScript stuff. One day I asked if she would be interested in putting a book together on how to write JavaScript and posting it to the HTML Goodies Web site. To my amazement and great joy, she said yes! So, we got started.<\/p>\n

<\/A><\/p>\n


<\/p>\n

How You Will Learn<\/b><\/font>

<\/p>\n

S<\/b><\/font>o, now you think I know nothing about JavaScript, and I’m relying on Andree to pull me through. Not as much as you’d think. I’ve actually got a pretty good handle on it, in spite of the books. In fact, my method of learning the language is the method these primers — and hopefully you — will follow.
<\/p>\n

     Every script that was sent to Java Goodies came via e-mail. Usually that did quite a number on the script. Scripts arrived bent, folded, and mutilated in all sorts of funny shapes. It was my job to put them back together so they would work again. So, after doing that a couple hundred times, I found I was using my reference books less and less. I could look at a script and see what the problem was. Error messages stopped sending me into a rage. I was learning JavaScript.

<\/p>\n

There’s more and more research showing that teaching by lecturing doesn’t work. When you read a textbook, you are essentially being lectured. These primers are going to try to come at it from a different angle.<\/p>\n

     The best way to learn this stuff is in a classroom with a teacher who can help you do projects and create while you learn. These primers can’t do that, as this is still going to be a one-way conversation over the Internet, but hopefully we can do better than the books by working backward.

<\/p>\n

A wise man once said, “Tell me and I forget. Show me and I remember. Involve me and I learn.<\/i>” The purpose here is to involve you.
<\/p>\n

     Each of these 30 primers will display one JavaScript and tear it apart so you can see how it works. You see, you have to be taught why something works, not just shown that it works. Case in point: David Copperfield doesn’t close the door on his assistant, open it, and exclaim “Son of a gun! She’s gone again!” He knows why she disappeared. All you know is that he shut the door and she went away.
<\/p>\n

     You both know that the box works, only he knows why<\/i> it works. He will be in a better position to create another trick, whereas you’ll just keep closing the door, hoping it’ll work.

<\/p>\n

<\/A><\/p>\n


<\/p>\n

The Format of the Primers<\/b><\/font>

<\/p>\n

F<\/b><\/font>irst off, there are 30 of them. Each uses the same method.
<\/p>\n