HTML, XHTML and CSS All-In-One for Dummies - Andy Harris [2]
Book III: Chapter 4: Using Alternative Positioning
Working with Absolute Positioning
Setting up the HTML
Adding position guidelines
Making absolute positioning work
Managing z-index
Handling depth
Working with z-index
Building a Page Layout with Absolute Positioning
Overview of absolute layout
Writing the XHTML
Adding the CSS
Creating a More Flexible Layout
Designing with percentages
Building the layout
Exploring Other Types of Positioning
Creating a fixed menu system
Setting up the XHTML
Setting the CSS values
Determining Your Layout Scheme
Book IV: Client-Side Programming with JavaScript
Book IV: Chapter 1: Getting Started with JavaScript
Working in JavaScript
Choosing a JavaScript editor
Picking your test browser
Writing Your First JavaScript Program
Embedding your JavaScript code
Creating comments
Using the alert() method for output
Adding the semicolon
Introducing Variables
Creating a variable for data storage
Asking the user for information
Responding to the user
Using Concatenation to Build Better Greetings
Comparing literals and variables
Including spaces in your concatenated phrases
Understanding the String Object
Introducing object-based programming (and cows)
Investigating the length of a string
Using string methods to manipulate text
Understanding Variable Types
Adding numbers
Adding the user’s numbers
The trouble with dynamic data
The pesky plus sign
Changing Variables to the Desired Type
Using variable conversion tools
Fixing the addInput code
Book IV: Chapter 2: Making Decisions with Conditions
Working with Random Numbers
Creating an integer within a range
Building a program that rolls dice
Using if to Control Flow
The basic if statement
All about conditions
Comparison operators
Using the else Clause
Using if-else for more complex interaction
Solving the mystery of the unnecessary else
Using switch for More Complex Branches
Creating an expression
Switching with style
Nesting if Statements
Building the nested conditions
Making sense of nested ifs
Book IV: Chapter 3: Loops and Debugging
Building Counting Loops with for
Building a standard for loop
Counting backward
Counting by 5
Looping for a while
Creating a basic while loop
Avoiding loop mistakes
Introducing Bad Loops
Managing the reluctant loop
Managing the obsessive loop
Debugging Your Code
Letting Aptana help
Debugging JavaScript on Internet Explorer
Finding errors in Firefox
Finding errors with Firebug
Catching Logic Errors
Logging to the console with Firebug
Looking at console output
Using the Interactive Debug Mode
Setting up the Firebug debugger
Setting a breakpoint
Adding a debugger directive
Examining debug mode
Debugging your code
Book IV: Chapter 4: Functions, Arrays, and Objects
Breaking Code into Functions
Thinking about structure
Building the antsFunction.html program
Passing Data to and from Functions
Examining the main code
Looking at the chorus
Handling the verses
Managing Scope
Introducing local and global variables
Examining variable scope
Building a Basic Array
Accessing array data
Using arrays with for loops
Revisiting the ants song
Working with Two-Dimension Arrays
Setting up the arrays
Getting a city
Creating a main() function
Creating Your Own Objects
Building a basic object
Adding methods to an object
Building a reusable object
Using your shiny new objects
Introducing JSON
Storing data in JSON format
Building a more complex JSON structure
Book IV: Chapter 5: Talking to the Page
Understanding the Document Object Model
Navigating the DOM
Changing DOM properties with Firebug
Examining the document object
Harnessing the DOM through JavaScript
Getting the blues, JavaScript-style
Writing JavaScript code to change colors
Managing Button Events
Embedding quotes within quotes
Writing the changeColor function
Managing Text