Chap 2
In Chapter 2, the book begins with the Break Neck Pizza Delivery website example files provided online. It goes through the examples of how the old site works and provides a layout of how the new layout should work asynchronously.
The first main idea they discuss is that event handlers connect HTML to JavaScript. The three event handlers they discuss are onChange, onFocus, and onBlur. onChange is used when a form field's value is changed. onFocus is used when a field or another part of the site gets the focus, whether through tabbing or clicking. onBlur is used when the focus leaves, also by tabbing or clicking.
This is also where they briefly mention the Document Object Model (DOM). The DOM is the way to ask the web browser to get information to or from a site.
Through creating a request, they provide the breakdown of supporting non-Microsoft and Microsoft browsers. The XMLHttpRequest object supports most browsers like Safari, FireFox, Mozilla, and Opera. The ActiveXObject object supports Microsoft browsers. They also have error handling code in case something wrong happens.
Also, a big piece of JavaScript is that any script in your page that's not in a function is static, meaning as the web browser loads your page, it automatically runs any JavaScript it finds.
From the server, the site will need:
1.) A new PHP script to lookup a customer's address from a customer's phone number
2.) The script lookupCustomer.php
3.) The script that will accept the customer's phone number
4.) The script doesn't return any HTML, just customer information
The first main idea they discuss is that event handlers connect HTML to JavaScript. The three event handlers they discuss are onChange, onFocus, and onBlur. onChange is used when a form field's value is changed. onFocus is used when a field or another part of the site gets the focus, whether through tabbing or clicking. onBlur is used when the focus leaves, also by tabbing or clicking.
This is also where they briefly mention the Document Object Model (DOM). The DOM is the way to ask the web browser to get information to or from a site.
Through creating a request, they provide the breakdown of supporting non-Microsoft and Microsoft browsers. The XMLHttpRequest object supports most browsers like Safari, FireFox, Mozilla, and Opera. The ActiveXObject object supports Microsoft browsers. They also have error handling code in case something wrong happens.
Also, a big piece of JavaScript is that any script in your page that's not in a function is static, meaning as the web browser loads your page, it automatically runs any JavaScript it finds.
From the server, the site will need:
1.) A new PHP script to lookup a customer's address from a customer's phone number
2.) The script lookupCustomer.php
3.) The script that will accept the customer's phone number
4.) The script doesn't return any HTML, just customer information

0 Comments:
Post a Comment
<< Home