<?xml version="1.0" encoding="iso-8859-1" standalone="yes"?>
<?xml-stylesheet type="text/xsl" href="deitelInternetWWW3e.xsl"?>
<!DOCTYPE table-of-contents [
 <!ENTITY e--n "&#8211;">
 <!ENTITY e---m "&#8212;">
 <!ENTITY nbsp "&#160;">
 <!ENTITY  oe  "&#x00F6;">


 <!ELEMENT table-of-contents  ( booktitle, author, chapters?, appendices? ) >

 <!ELEMENT booktitle ( #PCDATA ) >
 <!ELEMENT author    ( #PCDATA ) >

 <!ELEMENT chapters ( chapter* ) >

 <!ELEMENT appendices ( appendix* ) >

 <!ELEMENT chapter ( chaptitle,  sections ) >
 <!ATTLIST chapter num NMTOKEN #REQUIRED >

 <!ELEMENT appendix ( chaptitle,  sections* ) >
 <!ATTLIST appendix num NMTOKEN #REQUIRED >


 <!ELEMENT chaptitle ( #PCDATA ) >

 <!ELEMENT sections ( section+ ) >

 <!ELEMENT section ( secttitle,  (content|p|subs)+ ) >
 <!ATTLIST section num NMTOKEN #REQUIRED >
 <!ATTLIST section sp NMTOKEN #IMPLIED >


 <!ELEMENT content  ( (subs|p|headingP|headingC|ol|ul|pr|thingsToKnow|seo|perf|port|cpe|gpp|ept|aside )* ) >


<!ELEMENT headingC ( heading, content )>


<!ELEMENT headingP ( heading, p ) >

<!ELEMENT ol ( li|headingLi|linkLi )* >

<!ELEMENT ul ( li|headingLi|linkLi )* >

<!ELEMENT headingLi (heading, li)   >
<!ELEMENT linkLi ( #PCDATA )   >

<!ELEMENT cpe ( content | p )  >

<!ATTLIST cpe sp NMTOKEN #REQUIRED>
<!ATTLIST cpe num NMTOKEN #REQUIRED>

<!ELEMENT gpp ( content | p )  >

<!ATTLIST gpp sp NMTOKEN #REQUIRED>
<!ATTLIST gpp num NMTOKEN #REQUIRED>


<!ELEMENT seo ( content | p )  >

<!ATTLIST seo sp NMTOKEN #REQUIRED>
<!ATTLIST seo num NMTOKEN #REQUIRED>

<!ELEMENT port ( content | p )  >

<!ATTLIST port sp NMTOKEN #REQUIRED>
<!ATTLIST port num NMTOKEN #REQUIRED>

<!ELEMENT perf ( content | p )  >

<!ATTLIST perf sp NMTOKEN #REQUIRED>
<!ATTLIST perf num NMTOKEN #REQUIRED>

<!ELEMENT ept ( content | p )  >

<!ATTLIST ept sp NMTOKEN #REQUIRED>
<!ATTLIST ept num NMTOKEN #REQUIRED>


<!ELEMENT aside ( content | p )  >



 <!ELEMENT secttitle ( #PCDATA ) >


 <!ELEMENT subs ( heading , (content|p) ) >

 <!ATTLIST subs num NMTOKEN #REQUIRED >


 <!ELEMENT heading  ( #PCDATA | code )*  >


 <!ELEMENT code ( #PCDATA ) >

 <!ELEMENT em ( #PCDATA ) >

 <!ELEMENT note ( #PCDATA | code | em | p )* >
 <!ELEMENT notes ( note+ ) >


 <!ELEMENT li ( #PCDATA | code | em )* >

 <!ELEMENT p ( #PCDATA | code | em | term )* >
 <!ATTLIST p sp NMTOKEN #IMPLIED >

 <!ELEMENT thingsToKnow ( ttk+ ) >
 <!ELEMENT ttk ( #PCDATA | code | em | sup )* >


 <!ELEMENT sup ( #PCDATA ) >
 <!ELEMENT term ( #PCDATA ) >
 <!ELEMENT pre ( #PCDATA ) >



]>



<table-of-contents>
<booktitle>Internet and World Wide Web: How To Program, 5e</booktitle>
<author>Deitel, Deitel and Goldberg</author>

<chapters>

<chapter num="7"><chaptitle>JavaScript: Introduction to Scripting</chaptitle>
<sections>

<section num="7.1"><secttitle>Introduction</secttitle>

<content>

<p>The footnote to the first paragraph makes some notes about
the names JavaScript, JScript and ECMAScript; it is worth looking at.
The bottom line is that JavaScript (originally called LiveScript) came
originally from Netscape, JScript came from Microsoft, and ECMAScript
is an attempt to make a standard for JavaScript.</p>

<p>Other than that, not much of importance in this section; mostly just a "road map" of chapters 7-12 and how
they relate to the rest of the book.</p>



</content>
</section>

<section num="7.2"><secttitle>Simple Program: Printing a Line of Text in a Web Page</secttitle>

<content>

<p>This section provides an overview of a very simple JavaScript program: a one line script
that just puts some text on a web page.   This page doesn't really do anything very useful;
it would be easier to just put the <code>&lt;h1&gt;Welcome&nbsp;toJavaScript&nbsp;Programming!&lt;/h1&gt;</code> 
content directly on the page, not in a <code>script</code> tag.   But the purpose of this example isn't to be "useful"; it is to 
provide a very simple illustration of how a "script" fits into a web page, and one simple thing you can do in a script: put
content on the web page.</p>

<p>
Make sure you understand this page thoroughly.  It is simple enough that you should be 
able to understand each and every part of it.  If you do, 
you'll have an easier time with more complex pages later.</p>

<p>Another important concept from this section is the idea
that the <em>JavaScript&nbsp;interpreter</em> is built into the web browser.
The book mentions Internet&nbsp;Explorer by name, but in fact a 
JavaScript&nbsp;interpreter is built into Firefox as well, and every other
web browser that supports JavaScript.  The JavaScript&nbsp;interpreter is the
part of the web browser that parses the JavaScript commands, and either reports
syntax errors if any, or carries out the commands.</p>

<p>A few of the callouts in this section are worth noting:</p>

<gpp num="7.1" sp="177">
<p>Be sure to check this one out.  In general, it is important
when writing XHTML code to make it readable by humans as well as 
by the Web Browser.</p>
</gpp>

<port num="7.1" sp="177">
<content>
<p>The recommendation to enclose script tags is found in many textbooks and 
tutorials on JavaScript, and the authors repeat it here.  However, this
recommendation is not universally shared.  I'm not advocating against it,
just making you aware that designers differ on whether it is a good
idea or not.  See for example, the following:</p>

<ul>

<linkLi>http://www.netmechanic.com/news/vol6/javascript_no12.htm</linkLi>

<linkLi>http://developer.mozilla.org/en/docs/Properly_Using_CSS_and_JavaScript_in_XHTML_Documents</linkLi>

</ul>

</content>
</port>


<p>The definition of the following synonomous terms is in this
section, so be sure to locate the definition of these terms:</p>

<ul>
  <li>string</li>
  <li>character string</li>
  <li>string literal</li>
  <li>message</li>
</ul>

<seo num="7.1" sp="177">
<p>The authors state: "Strings in JavaScript can be enclosed in either double quotation marks (<code>"</code>) or single quotation marks.(<code>'</code>)."  A useful point, but I'm not sure it rises to the exalted level of a "software engineering observation".  </p>
</seo>

<p>The paragraph near the top of p. 178 includes several important
terms related to <em>object-oriented programming</em>.  Compare this
discussion with that on pp. 36-39, 45, and 51-52 of your Essentials
For Design: JavaScript, Level 1 book. </p>

<ul>
  <li>object</li>

  <li>attributes (data)</li>
  <li>behaviors (methods)</li>
  <li>arguments (also called parameters)</li>
</ul>

<p>Note that the user of the word "attributes" in the lingo of
object-oriented programming is subtly different from the use of the
word "attributes" as it pertains to an HTML element.  Here the word is
more like the use of the word "properties" on p. 51 of your Essentials
for Design JS1 book.</p>

<p>Several of the callouts in this section contain some interesting
points:</p>

<gpp num="7.2" sp="178">
<p>Semicolons aren't always required in JavaScript, but it is a good
idea to always use them anyway for clarity.   Please always include
them in the JavaScript code you write for this course.</p>
</gpp>


<p>Several of the callouts in this section contain some interesting
points:</p>

<cpe num="7.2" sp="178">
<p>Hiding inside this callout is the definition of "case senstivity", "syntax error", and some tips on how to get
JavaScript errors to show up in Internet Explorer.  Be sure to read over this!
</p>
</cpe>

<ept num="7.1" sp="179">
<p>This one is a <em>really</em> useful tip.  Watch for this one in class or in your programming.  I'll give some extra credit points to the first person that emails me a really good example of this, or points one out during lecture and makes reference to this "Error Prevention Tip". (This will also tell me who is reading the reading notes and the textbook.)
</p>
</ept>

<p>The use of <code>\"</code> is mentioned in this section, as is are the following terms, which you should know for the exam:</p>

<ul>
  <li>escape character</li>
  <li>escape sequence</li>
</ul>

<cpe num="7.5" sp="182">
<p>Watch out for this; you can't do italics or bold or such in alert boxes.
Only plain text: HTML or XHTML tags will just be passed right on through.</p>
</cpe>

</content>
</section>

<section num="7.3"><secttitle>Obtaining User Input with prompt Dialogs</secttitle>

<content>

<p>One of the main reasons for studying JavaScript is to understand
how to make web pages interactive.  This section talks about how
to do that with the <code>prompt</code> method of the <code>window</code>
object.</p>

<p>Note that using forms is probably a better way to get input in 
most cases, but this gives us someplace to start from, since using
forms for input is a bit more complex.  Using prompts gives us an easy way
to get some input while we are still learning basic programming 
techniques.</p>


<subs num="7.3.1"><heading>Dynamic Welcome Page </heading>
<p>@@@</p>
</subs>
<subs num="7.3.2"><heading>Adding Integers</heading>
<p>@@@</p>
</subs>

</content> <!-- end of content in section 7.3 -->

</section> <!-- end of section 7.3 -->


<section num="7.4"><secttitle>Memory Concepts</secttitle>

<p>@@@</p>
</section> <!-- end of section 7.4 -->

<section num="7.5"><secttitle>Arithmetic</secttitle>

<p>@@@</p>
</section>
<section num="7.6"><secttitle>Decision Making: Equality and Relational Operators</secttitle>

<p>@@@</p>
</section>

<section num="7.7"><secttitle>Web Resources</secttitle>

<p>@@@</p>
</section>


</sections>
</chapter>


</chapters>

</table-of-contents>
