<h2>JavaScript, Part I</h2>
<img class="alignright" title="Famous Star Trek kiss" src="/images/teaching/kirk_uhura.jpg" alt="Famous Star Trek kiss" width="300" height="288" />We have discussed the structure web pages, we have covered the presentation of web pages, it's now time to start thoroughly exploring how to give web pages functionality. We already investigated this aspect back in section 3, when we learned the art of making forms. But web page functionality goes much deeper than forms: Forms are great for collecting and sending data, but in order for us to dynamically manipulate the structure and presentation of our web page, forms can do little to help us.

Enter JavaScript, the heart of all web browser functionality. JavaScript, whether purists like it or not, is a programming language. And the first rule for fledgling web developers who are encountering JavaScript for the first time is "Don't Panic!" We are not going to force you to learn how to program--indeed, an entire semester could be devoted to this--but we are going to show how to take advantage of other people's programming efforts.

Nevertheless, it's necessary to understand the basics, so we delve into the concept of variables, little boxes of computer memory that hold bits of information. We discuss writing statements, lines of text that tell a computer what to do with its variables. We show how we package up variables and statements into reusable functions. And, at last, we demonstrate how both variables and functions can be bundled together to form the core players of JavaScript: objects.

With this in mind, we present our final lesson of the day, one thing to remember above all else: JavaScript treats your web page as one gigantic object, an object that JavaScript can manipulate to its heart's content. And by doing so, applications as complex as Google Docs are born.
<h2>Resources</h2>
<ul>
	<li><a title="Section 08 Slides" href="/teaching/section_08_slides.pdf">Slides</a> (PDF, 5.0 MB)</li>
	<li><a title="JavaScript Tutorial" href="http://www.w3schools.com/js/default.asp	">JavaScript Tutorial</a></li>
	<li><a title="JavaScript Developer Center" href="https://developer.mozilla.org/en/javascript">JavaScript Developer Center</a></li>
	<li><a title="JavaScript Tutorial (for non-programmers)" href="http://www.webteacher.com/javascript/index.html">JavaScript Tutorial (for non-programmers)</a></li>
</ul>