Index
Symbols
- + (addition) operator, 199, 200, 220, 337–338, 438, 439, 587
- && (AND) operator, 215–216, 217–219, 220, 230, 439, 485
- @ sign, 315
- (backslash), 51, 442
- {} (braces), 82, 227, 251, 358
- [] symbol, 584–585
- [^] symbol, 585
- ^ symbol, 588
- + (concatenation), 205, 220
- -- (decrement) operator, 199, 202, 220, 239, 438
- / (division) operator, 199, 202–204, 220, 438
- $ (dollar sign), 368, 438, 588–589
- . (dot) symbol, 439, 583–584, 589
- .. (double dots), 630
- ““ (double quotation marks), 192
- \ (double-slash), 180
- = (equal) operator, 439, 483
- = (equal sign), 198, 358–359
- == (equality operator), 208–209, 220, 358–359
- ** (exponentiation) operator, 438
- > (greater than) operator, 208, 209, 220, 347, 439, 483
- >= (greater than or equal) operator, 208, 210, 220, 439, 483
- # (hashtag symbol), 98, 610
- - (hyphen), 407
- === (identity) operator, 208, 212, 220, 358–359, 439
- ++ (increment) operator, 199, 200–201, 220, 438
- < (less than) operator, 208, 209–210, 220, 439, 483
- <= (less than or equal) operator, 208, 210–211, 220, 439, 483
- % (modulus) operator, 199, 204, 220, 438
- * (multiplication) operator, 198, 199, 202, 220, 438, 586–587
- !== (non-identity) operator, 208, 212–213, 220, 439
- ! (NOT) operator, 215, 217, 220, 439, 485
- != (not equal) operator, 208, 209, 220, 439
- <> (not equal to) operator, 483
- || (OR) operator, 215, 216–217, 217–219, 220, 230, 439, 485
- | symbol, 589
- ? symbol, 586
- ; (semicolon), 178, 347
- - (subtraction/negation) operator, 199, 201–202, 220, 438
- ?: (ternary) operator, 214, 221
- ~ (tilde) symbol, 550
A
- A script on this pager is causing [browser name] to run slowly… error message, 361
- <a> tag, 62–63, 64, 106, 129
- abs() method, 339
- absolute, 120
- absolute measurement unit, 88
- absolute positioning, 122–124
- accessibility, of web apps, 605–608
- accessing
- data on servers, 16
- local web servers, 27–29, 31–33
- PHP error log, 464–465
- accordions
- about, 403–406, 424
- hiding content with, 422–424
- showing content with, 422–424
- ad requirements, as a web hosting consideration, 39
- adaptive layout, for web apps, 603–604
- addClass() method, 382–383, 384–385, 385–386, 522
- adding
- app controls, 745–754
- box controls, 750–751
- classes
- about, 289–290, 382–383
- to elements, 289–290
- color controls, 752–754
- comments to code, 180
- data
- to MySQL tables, 479
- to storage, 735–736
- data items, 649–652
- elements
- to arrays, 303–304
- in jQuery, 374–375
- to pages, 287–290
- files to web servers, 28, 32
- folders to web servers, 28, 32
- form buttons, 537–538
- headings, 60–61
- JQuery Mobile to web apps, 730–731
- line breaks, 440–441
- menu separator, 418
- methods to classes, 460–461
- padding, 107–108
- properties to classes, 459–460
- quotations, 61–62
- selection lists, 551–555
- structure, 13–14
- styles
- about, 14–15, 83–87
- to web pages, 83–87
- table data with INSERT query, 490–491
- tags to elements, 288
- text, 56–57
- text controls, 747–750
- text to elements, 288
- titles to web pages, 54–56
- users to databases, 689–690
- watch expressions, 354–355
- web forms, 697–700
- addition (+) operator, 199, 200, 220, 337–338, 438, 439, 587
- administration interface, as a web hosting consideration, 39
- age, determining, 333–334
- Ajax
- about, 510–511
- joining PHP and JavaScript with JSON and, 509–532
- making calls with jQuery, 511–526
- request for data, 654
- returning Ajax data as JSON text, 528–532
- Ajax engine, 510
- alert() method, 178, 207, 245, 280–281, 283
- aligning
- flex items
- along primary axis, 139–140
- along secondary axis, 140–141
- grid items, 160–161
- paragraph text, 92
- align-self property, 161
- Alphabet (website), 594
- alternative text, 59
- ancestor element, 96
- anchor, 64
- anchor object, 270
- AND (&&) operator, 215–216, 217–219, 220, 230, 439, 485
- animate() method, 406–408, 410
- animation
- about, 387–388
- building pages with, 398–410
- controlling duration and pace, 402
- CSS properties, 406–408
- running code after ending of, 408–410
- Apache, 23, 29
- Apache Friends, 24, 28, 32
- app data, 597
- app functions, of web apps, 595
- append() method, 374–375, 375–376
- appending elements as children, 288
- Applications link, 28, 32
- applyFilters() function, 658–661
- applying
- basic text tags, 58–62
- effects, 424–425
- font families, 89–91
- interactions, 428–429
- apps. See also mobile web apps
- about, 19, 593–594, 619
- accessibility of, 605–608
- adding jQuery Mobile to, 730–731
- appearance of pages, 598–599
- Atom editor, 34
- back-end code, 626–630
- building home pages for, 635
- Coda, 34
- creating
- back-end initialization files, 631–632
- data, 643–652
- databases, 624–625
- front-end common files, 633–634
- startup files for, 630–635
- tables, 624–625
- data requirements for, 596–597
- defending, 612–618
- deleting data, 668–672
- displaying data, 652–661
- editing data, 661–668
- functionality of, 595–596
- mobile, 19–20
- Notepad++, 34
- page requirements for, 597–598
- planning, 595–599
- reading data, 652–661
- responsiveness of, 599–605
- role of
- MySQL in, 494–495
- PHP in, 494–495
- security for, 608–618
- setting up directory structure, 620–624
- starting Data class, 639–640
- Sublime Text, 34
- TextMate, 34
- updating data, 661–668
- arguments
- with Date object, 324
- defined, 250, 255, 457
- end, 322
- ARIA label, 607
- arithmetic assignment operators, 199–200, 204–205
- arithmetic operators, 199–200, 438
- Array(), 293–294, 319–320
- array literals, 296
- array objects, 269, 300–310
- arrays
- about, 291–293
- adding elements to, 303–304
- array objects, 300–310
- associative, 446–447
- declaring, 293–294, 295–296, 445–446
- inserting elements, 308–310
- multidimensional, 299–300, 450–451
- one-dimensional, 299
- ordering elements, 306–308
- outputting values, 447–448
- PHP, 445–451
- populating
- about, 295–297
- with data, 294–299
- using loops, 296–297
- removing elements, 303, 305, 308–310
- replacing elements, 308–310
- returning subsets of, 305–306
- reversing order of elements, 304–305
- sorting, 448–449
- storing query results in, 500–501
- two-dimensional, 299
- values, 450
- working with data using loops, 297–299
- arsort() function, 449
- <article> tag, 74, 104, 106, 764
- <aside> tag, 75, 114, 634
- asort() function, 449
- assigning grid items to rows/columns, 157–160
- associative arrays, 446–447
- asynchronous, 510
- Asynchronous JavaScript and XML (Ajax)
- about, 510–511
- joining PHP and JavaScript with JSON and, 509–532
- making calls with jQuery, 511–526
- request for data, 654
- returning Ajax data as JSON text, 528–532
- @ sign, 315
- Atom (website), 34
- attr() method, 385–386
- attributes
- class attribute, 382–383, 385–386
- id attribute, 64, 278, 279, 284–285
- onclick attribute, 255, 256
- srcset attribute, 733
- style attribute, 83
- for tags, 52–53
- width attribute, 52
- auditory impairments, 606
- automatic looping, through jQuery sets, 372
B
- b symbol, 585–586
- B symbol, 586
- <b> tag, 60
- back end
- defined, 12
- MySQL, 15–16
- PHP, 15–16
- web apps, 677–682
- back() method, 274
- back-end code, for web apps, 626–630
- back-end initialization files, 631–632
- background-color property, 94–95
- backgrounds, coloring, 94–95
- backing up MySQL data, 473
- backslash (), 51, 442, 589
- bandwidth, as a web hosting consideration, 38
- baseline value, 141
- Berners-Lee, Tim (inventor of the web), 20
- BETWEEN…AND operator, 484
- bin2hex() function, 628, 689
- binary() function, 617
- blind effect, 426
- block statement, 227
- block syntax, 227
- block-level elements, 113
- <blockquote> tag, 62, 104
- blur() method, 392, 559–560
- blurring elements, 559–560
- body element, 253–254
- body section, 54
- <body> tag, 54, 56, 95–96, 151, 162, 743
- bold control, 749
- bolding text, 91
- Boolean literals, 193
- border property, 109–110
- borders
- as a box component, 104
- building, 109–110
- values of, 109
- bottom property, 121
- bounce effect, 426
- box controls, adding, 750–751
- box styles, 745
- braces ({}), 82, 227, 251, 358
- Brackets (website), 34
- break mode
- about, 348
- entering, 348–350
- exiting, 350
- stepping into code, 351
- break statement, exiting loops using, 243–245
- breakpoint, setting, 349
- browsers
- displaying Console in, 346
- handling, 176
- storing user data in, 734–737
- validating web form data in, 566–574
- window events, 390
- bugs, 343
- buildGradient() function, 764
- buildHover() function, 764
- building
- app menus, 745
- back-end initialization files, 631–632
- borders, 109–110
- bulleted lists, 65–68
- Button Builder app, 740–767
- comparison expressions, 208–214
- custom classes, 459
- data, 643–652
- data handler scripts, 640–641
- databases, 624–625
- elements, 287
- external JavaScript files, 181–182
- forms, 643–647
- front-end common files, 633–634
- grid gaps, 155–156
- home pages for web apps, 635
- HTML5 web forms, 536–537
- links, 62–65
- logical expressions, 215–219
- margins, 110–113
- multidimensional arrays, 299–300, 450–451
- MySQL databases, 473–480
- MySQL tables, 477–479
- navigation menus, 418–420
- numbered lists, 65–68
- numeric expressions, 199–205
- objects, 461
- PHP expressions, 438–439
- primary keys, 479–480
- queries, 504–505
- scripts, 175–180
- SELECT queries, 481–482, 499–500
- startup files for web apps, 630–635
- string expressions, 205–207
- strings, 302–303
- tables in MySQL databases, 473–480, 624–625
- user handling script, 679–682
- web forms, 683–685
- web page accordions, 403–406
- web pages with animation, 398–410
- bulleted lists, building, 65–68
- Button Builder app, 740–767
- button text control, 749
- <button> tag, 256, 537
C
- calculateProfitSharing() function, 266
- calculating days between dates, 334–335
- callback function, 389
- calling functions, 252–255
- camelCase, 188
- carriage return, 57
- cascade (CSS), 100–101
- Cascading Style Sheets (CSS)
- about, 12–13, 14–15
- absolute positioning, 123
- adding styles to web pages, 83–87
- animation of properties, 406–408
- assigning grid items to rows/columns, 158–159
- basics of, 80–81
- Button Builder app, 754–757
- cascade, 81, 100–101
- case-sensitivity for properties, 289
- centering elements, 142
- collapsing
- containers, 119
- margins, 111–112
- colors, 93–95
- controlling horizontal space, 129
- creating
- for mobile-first web development, 727
- web page accordions, 403
- defined, 14
- fixed positioning, 125
- inline blocks for macro page layouts, 134–135
- laying out
- content columns with flexbox, 149–150
- content columns with Grid, 161–162
- navigation bar with flexbox, 143
- measurement units, 88–89
- modifying with jQuery, 377–385
- page elements with inline blocks, 133
- properties, 378–382, 406–408
- relative positioning, 121
- rules and declarations, 81–83
- setting up flex container, 138
- sheets, 80–81
- shrinking flex items, 147
- specifying grid rows/columns, 154
- styles, 80
- styling
- invalid fields, 572
- page text, 87–93
- web pages with, 79–101
- text properties, 88
- using jQuery's shortcut event handlers, 392
- using selectors, 96–100
- web page family, 95–96
- case, 231
- case-sensitivity
- in comparison expressions, 213
- in CSS, 82
- CSS properties, 289
- of JavaScript, 357
- for tags, 54
- CDNs (content delivery networks), 367
- cell() method, 339
- centering elements, 141–142
- chaining, 372, 408–410
- changing
- CSS with jQuery, 377–385
- element styles, 288–289
- selected options, 555
- table data with UPDATE query, 491
- values of properties, 273
- web files, 45
- character entities, 68
- character reference, 69
- characters, handling, 77–78
- charAt() method, 316–317
- charCodeAt() method, 316
- checkboxes
- coding, 543–548
- getting state, 546–547
- referencing, 546
- setting state, 547–548
- checking
- data types, 613–614
- for required fields, 575–578
- for signed-in users, 696–697
- user credentials, 700–703
- users, 690–695
- child element, 96
- child selector, 97, 99–100
- child selector (jQuery), 371
- choosing
- elements with jQuery, 369–373
- “non-mobile” breakpoints, 727–729
- text editors, 33–34
- Chrome
- adding watch expressions, 354
- displaying Console in, 346
- opening web development tools in, 344
- stepping into code, 351
- stepping out of code, 352
- stepping over code, 352
- viewing all variable values, 353
- class attribute, 382–383, 385–386
- class selector, 97–98, 370
- classes
- adding
- about, 382–383
- to elements, 289–290
- methods to, 460–461
- properties to, 459–460
- creating custom, 459
- defined, 97
- Invoice class, 459
- manipulating, 382–385
- members of, 459
- offset-image class, 122
- removing, 383–384
- specifying elements by names, 286
- toggling, 384–385
- ui-accordion class, 424
- ui-accordion-content class, 424
- ui-accordion-header class, 424
- ui-dialog class, 422
- ui-dialog-container class, 422
- ui-dialog-title class, 422
- ui-dialog-titlebar class, 422
- ui-menu class, 420
- ui-menu-item class, 420
- ui-menu-wrapper class, 420
- User class, 678–679
- clear property, 117
- clearing floats, 116–117
- clearInterval() method, 279, 280
- clearTimeout() method, 278
- .click() method, 557–561
- client-side programming language, 174
- clip effect, 426
- close() method, 499
- CNET Web Hosting Solutions (website), 41
- Coda (website), 34, 44
- code
- adding comments to, 180
- back-end, 626–630
- for checkboxes, 543–548
- completion in text editors, 34
- debugging. See debugging
- executing in Console, 347
- including from other PHP files, 629–630
- indenting, 355–356
- jQuery, 368–369
- looping, 234–235
- pausing, 348–350
- PHP, 451–456
- previewing in text editors, 33
- running, 408–410, 765
- running after animation ends, 408–410
- stepping through, 350–352
- cognitive impairments, 606
- collapsing
- containers, 117–120
- margins, 111–113
- collation, 474
- color controls, adding, 752–754
- color keyword, 93, 109
- color picker, 555–556
- color property, 94
- color styles, 746
- colors
- about, 93
- backgrounds, 94–95
- specifying, 93–94
- text, 94
- column (flex-direction property), 137
- column-reverse (flex-direction property), 137
- columns
- assigning to, 157–160
- MySQL, 468
- MySQL data, 475–476
- comma-delimited strings, 319
- comments
- adding to code, 180
- debugging and, 356
- defined, 180
- communicating
- with server with .get() method, 523–526
- with server with .post() method, 523–526
- comparison expressions
- building, 208–214
- using strings in, 213
- comparison operators, 211–212, 439, 482–484
- compound criteria, 484–485
- compound statement, 227
- concat() method, 301–302
- concatenating, 205, 301–302
- concatenation (+), 205, 220
- configuring
- header, 744
- home pages, 674–677
- php.ini for debugging, 463–464
- confirm() method, 274, 281–282, 283
- connecting, to MySQL database, 497–499
- Console
- displaying in browsers, 346
- executing code in, 347
- logging data to, 346–347
- console property, 276
- Console tab, 344
- Console window, debugging with, 345–347
- console.log() method, 247, 261, 346–347
- console.table() method, 346–347
- constants, 334, 626–627
- construct() function, 459
- constructor, 293–294
- contact forms. See web forms
- containers, collapsing, 117–120
- content
- as a box component, 104
- dividing into tabs, 415–418
- hiding with accordions, 422–424
- scaling, 726–727
- showing with accordions, 422–424
- content columns
- laying out with flexbox, 149–152
- laying out with Grid, 161–162
- content delivery networks (CDNs), 367
- content first approach, 725–726
- continue statement, 245–246
- control structures, JavaScript, 226
- controlling
- animation duration and pace, 402
- browsers, 176
- characters, 77–78
- flow of PHP code, 451–456
- JavaScript, 170–171
- JSON data returned by server, 530–532
- loop execution, 243–246
- order of precedence, 221–223
- POST requests in PHP, 513–514
- shrinkage, 148–149
- web form events, 557–561
- words, 77–78
- convergence, 264
- converting
- data, 613
- getDay() method into day name, 329–330
- getMonth() method into month names, 328–329
- server data to JSON format, 528–530
- between strings and numbers, 336–338
- copying custom CSS, 766–767
- cos() method, 339
- countdown() function, 280
- cPanel, 45
- createData() method, 649–652
- createUser() method, 686, 689–690
- creating
- app menus, 745
- back-end initialization files, 631–632
- borders, 109–110
- bulleted lists, 65–68
- Button Builder app, 740–767
- comparison expressions, 208–214
- custom classes, 459
- data, 643–652
- data handler scripts, 640–641
- databases, 624–625
- elements, 287
- external JavaScript files, 181–182
- forms, 643–647
- front-end common files, 633–634
- grid gaps, 155–156
- home pages for web apps, 635
- HTML5 web forms, 536–537
- links, 62–65
- logical expressions, 215–219
- margins, 110–113
- multidimensional arrays, 299–300, 450–451
- MySQL databases, 473–480
- MySQL tables, 477–479
- navigation menus, 418–420
- numbered lists, 65–68
- numeric expressions, 199–205
- objects, 461
- PHP expressions, 438–439
- primary keys, 479–480
- queries, 504–505
- scripts, 175–180
- SELECT queries, 481–482, 499–500
- startup files for web apps, 630–635
- string expressions, 205–207
- strings, 302–303
- tables in MySQL databases, 473–480, 624–625
- user handling script, 679–682
- web forms, 683–685
- web page accordions, 403–406
- web pages with animation, 398–410
- cross-site scripting (XSS), 611–612
- CRUD approach, to handling data, 638–642
- CSS (Cascading Style Sheets)
- about, 12–13, 14–15
- absolute positioning, 123
- adding styles to web pages, 83–87
- animation of properties, 406–408
- assigning grid items to rows/columns, 158–159
- basics of, 80–81
- Button Builder app, 754–757
- cascade, 81, 100–101
- case-sensitivity for properties, 289
- centering elements, 142
- collapsing
- containers, 119
- margins, 111–112
- colors, 93–95
- controlling horizontal space, 129
- creating
- for mobile-first web development, 727
- web page accordions, 403
- defined, 14
- fixed positioning, 125
- inline blocks for macro page layouts, 134–135
- laying out
- content columns with flexbox, 149–150
- content columns with Grid, 161–162
- navigation bar with flexbox, 143
- measurement units, 88–89
- modifying with jQuery, 377–385
- page elements with inline blocks, 133
- properties, 378–382, 406–408
- relative positioning, 121
- rules and declarations, 81–83
- setting up flex container, 138
- sheets, 80–81
- shrinking flex items, 147
- specifying grid rows/columns, 154
- styles, 80
- styling
- invalid fields, 572
- page text, 87–93
- web pages with, 79–101
- text properties, 88
- using jQuery's shortcut event handlers, 392
- using selectors, 96–100
- web page family, 95–96
- CSS Box Model, 104–105
- CSS code, 746, 763–764
- CSS colors, 753
- CSS declaration, 82
- CSS Flexible Box (flexbox), 128
- CSS Grid
- about, 128
- browser support, 163–164
- shaping page layout with, 153–164
- css() method, 372, 378–382
- ctype_alpha() function, 578, 614
- customer_id property, 462
- CuteFTP (website), 44
- Cyberduck (website), 44
D
- d symbol, 582–583
- D symbol, 583
- data
- accessing on servers, 16
- adding
- to MySQL tables, 479
- to storage, 735–736
- to tables with INSERT query, 490–491
- app, 597
- columns of, 475–476
- converting, 613
- creating, 643–652
- deleting, 668–672
- displaying, 652–661
- editing, 661–668
- escaping the, 616
- filtering, 613, 657–661
- getting about events, 393–394
- getting from web storage, 736–737
- importing into MySQL, 471–473
- logging to Console, 346–347
- modifying in tables with UPDATE query, 491
- moving to web pages, 469
- outgoing, 616
- populating arrays with, 294–299
- preparing for submission, 563
- reading, 652–661
- removing
- from tables with DELETE query, 492
- from web storage, 737
- requirements for web apps, 596–597
- sanitizing incoming, 612–614
- sending to servers, 519–520, 685–688
- storing on servers, 16
- types of, 474–475
- updating, 661–668
- user-generated, 596
- data handler scripts, 640–641
- data management
- about, 637
- CRUD approach, 638–642
- data types
- checking, 613–614
- defined, 189
- literal, 189–193
- validating fields based on, 580–581
- database management system (DBMS), 468
- databases
- adding users to, 689–690
- creating, 624–625
- as a web hosting consideration, 39
- date argument, 324
- Date() function, 325
- Date object. See also dates
- about, 269
- arguments with, 324
- extracting information about dates, 325–328
- methods, 326, 330
- setting dates, 330–332
- working with, 324–325
- date picker, 556
- dates. See also Date object
- about, 322–335
- arguments with Date object, 324
- calculating days between, 334–335
- extracting information about, 325–328
- performing calculations for, 332–335
- performing complex calculations, 334
- setting, 330–332
- specifying any, 325
- specifying current, 324–325
- working with Date object, 324–325
- dbclick() method, 392
- DBMS (database management system), 468
- dd argument, 324
- debugger statement, 247, 350
- debugging
- about, 341
- configuring php.ini for, 463–464
- with the Console window, 345–347
- with echo statements, 465–466
- JavaScript errors, 342–343, 356–359
- monitoring script values, 352–355
- pausing code, 348–350
- PHP, 463–466
- stepping through code, 350–352
- strategies for, 355–356
- tools for, 344–345
- with var_dump() statements, 466
- Debugging tool tab, 345
- decision-making
- with if() statement, 452–453
- multiple, 229–234
- with switch() statement, 453–454
- declaration block, 82
- declarations (CSS), 81–83
- declaring
- arrays, 293–296, 445–446
- JSON variables, 527–528
- PHP variables, 438
- variables, 184–185
- decrement (--) operator, 199, 202, 220, 239, 438
- dedicated server, as a web hosting consideration, 39
- defense in depth, 612
- delegating events, 396–398
- DELETE query, 481, 492
- deleteData() method, 672
- deleteUser() method, 716–719
- deleting
- array elements, 303, 305, 308–310
- attributes, 386
- breakpoint, 349
- classes, 383–384
- data, 668–672
- data from web storage, 737
- elements in jQuery, 377
- queries, 504–505
- table data with DELETE query, 492
- users, 714–719
- watch expressions, 355
- deletion task, 309
- descendant element, 96
- descendant selector, 97, 99, 370
- designing MySQL database tables, 474–477
- determining
- age, 333–334
- length of String object, 312–313
- dialog widget, 420
- dialogs, displaying messages in, 420–422
- dimensions, as a box component, 104
- directory
- defined, 42
- setting up structure of, 620–624
- display_errors, 463
- display_header function, 464
- displaying
- Console in browsers, 346
- content with accordions, 422–424
- data, 652–661
- elements, 399
- messages
- in dialogs, 420–422
- to users, 177–179
- using alert() method, 280–281
- <div> tag, 76–77, 104, 105, 106, 394
- dividend, 202
- dividing content into tabs, 415–418
- division (/) operator, 199, 202–204, 220, 438
- divisor, 202
- DNS (domain name system)
- defined,
- as a web hosting consideration, 38
- Doctype declaration, 53
- document events, 389
- Document object, 180, 284–290
- Document Object Model (DOM), 368
- document property, 276
- document root, 620
- document subobject, 270
- document.body function, 253–254
- document.write() statement, 180
- dollar sign ($), 368, 438, 588–589
- DOM (Document Object Model), 368
- domain name system (DNS)
- defined,
- as a web hosting consideration, 38
- DOM-manipulation library, 368
- dot (.) symbol, 439, 583–584, 589
- double dots (..), 630
- double quotation marks (““), 192
- double-slash (\), 180
- do…while() loops, 241–242, 315, 456
- draggable interaction, 429–430
- drop effect, 426
- drop shadow, for buttons, 538
- droppable interaction, 430
- duration, of animation, 402
- dynamic web pages
- defined, 15, 18, 533
- how they work, 18–19
E
- echo output command, 437
- echo statement, 437, 440, 465–466
- ecommerce, as a web hosting consideration, 40
- editing
- data, 661–668
- watch expressions, 355
- effect() method, 424–425
- effects
- applying, 424–425
- jQuery UI, 424–428
- as a jQuery UI category, 412
- elements
- adding
- to arrays, 303–304
- class to, 289–290
- in jQuery, 374–375
- to pages, 287–290
- tags to, 288
- text to, 288
- appending as children, 288
- blurring, 559–560
- centering, 141–142
- changing styles of, 288–289
- creating, 287
- defined, 294
- fading, 400
- floating, 115–120
- hiding, 399
- inline, 77–78
- inserting in arrays, 308–310
- listening for changes, 560–561
- ordering for arrays, 306–308
- removing
- from arrays, 303, 305, 308–310
- in jQuery, 377
- replacing
- in arrays, 308–310
- HTML, 375–376
- reversing order of in arrays, 304–305
- selecting with jQuery, 369–373
- semantic, 76
- showing, 399
- sliding, 401
- specifying, 284–287
- updating with server data using .load() method, 514–522
- working with, 287–290
- em unit, 89
- <em> tag, 51, 60
- email addresses, as a web hosting consideration, 39
- email fields, validating, 569
- email forwarding, 39
- email type, 539
- embedded style sheet, 85
- embedding internal style sheets, 84–86
- emphasizing text, 58–59
- empty() function, 575–578
- end argument, 322
- end tag, 50
- Enter key, 57
- entering break mode, 348–350
- entity name, 69
- equal (=) operator, 439, 483
- equality operator (==), 208–209, 220, 358–359
- equal sign (=), 198, 358–359
- error log (PHP), 464–465
- error messages (JavaScript), 359–361
- error types (JavaScript), 342–343
- error_reporting, 464
- errors
- JavaScript, 356–359
- load-time, 342
- logic, 343
- runtime, 342–343
- syntax, 342
- escape sequences, 192–193
- escaping
- the data, 616
- quotation marks, 441–442
- even filter, 373
- event handlers
- about, 389
- setting up, 390–391
- shortcut jQuery, 391–393
- turning off, 398
- event listener, 389
- Event object, 393–394
- event-driven language, 388
- events
- about, 387–389
- building reactive pages with, 388–398
- calling functions in response to, 254–255
- delegating, 396–398
- getting data about, 393–394
- objects and, 268
- preventing default action, 394–395
- types of, 389–390
- web form, 557–561
- examples, in this book,
- executing code in Console, 347
- exiting
- break mode, 350
- loops using break statement, 243–245
- exp() method, 339
- Expected ( error message, 359
- Expected { error message, 359–360
- explode effect, 426
- exponential notation, 190–191
- exponentiation (**) operator, 438
- expressions
- about, 197
- building
- comparison expressions, 208–214
- logical expressions, 215–219
- string expressions, 205–207
- comparison, 208–214
- numeric, 199–205
- operator precedence, 219–223
- PHP, 438–439
- regular, 570, 571, 582–589
- structure of, 197–198
- using parentheses in, 222–223
- watch, 354–355
- expression-width pairs, 732
- external style sheets, linking to, 86–87
- extracting
- information about dates, 325–328
- substrings with methods, 315–323
F
- fade effect, 426
- fadeIn() method, 400, 402
- fadeOut() method, 400, 402
- fadeToggle() method, 400, 402, 405
- fading elements, 400
- FAQs link, 28, 32
- feature queries, 164
- file picker, 556
- File Transfer Protocol (FTP), 40, 44, 617
- files. See also folders
- adding to web servers, 28, 32
- external JavaScript, 181–182
- insecure uploads of, 612
- securing uploads, 617
- viewing on servers, 28, 32
- website, 44–45
- FileZilla (website), 44
- filter() method, 658–661
- filtering
- data, 613, 657–661
- jQuery sets, 372–373
- filter_var() function, 580–581
- finding
- free hosting providers, 37
- substrings, 313–315
- web hosts, 35–45, 40–41
- Firefox
- adding watch expressions, 354
- displaying Console in, 346
- opening web development tools in, 344
- stepping into code, 351
- stepping out of code, 352
- stepping over code, 352
- viewing all variable values, 354
- first filter, 373
- .first() method, 551
- fixed, 120
- fixed positioning, 125–126
- fixed-width layout, for web apps, 600
- flex container
- defined, 137
- setting up, 137–139
- flex items, 137
- flex property, 152
- flexbox
- browser support, 152–153
- flexible layouts with, 136–153
- laying out
- content columns with, 149–152
- navigation bar with, 143–144
- flex-direction property, 137
- flex-grow property, 144–146
- Flexible Box Layout Module. See Flexbox
- flexible layouts
- with Flexbox, 136–153
- for web apps, 602
- flex-shrink property, 146–149
- flex-start alignment, 140
- float property, 115–120
- floating elements, 115–120
- floating-point numbers, 190, 336
- floats
- about, 128
- page elements with, 128–132
- floor() method, 339
- focus, setting, 558
- focus() method, 558–559
- fold effect, 427
- folders. See also files
- adding to web servers, 28, 32
- viewing on servers, 28, 32
- font families
- applying, 89–91
- controls for, 749
- font size control, 749
- font-family property, 14, 88
- font-size property, 14, 88
- font-style property, 88
- font-weight property, 88
- <footer> tag, 75–76, 96, 114, 116–117
- footers, loading common, 516–517
- for() loops, 237–241, 296–297, 298, 317, 455
- for() statement, 236, 300
- foreach() loop, 450, 501
- form events, 389
- form object, 270
- <form> tag, 536
- formats, for images, 69
- forms
- about, 533–534, 565
- adding
- about, 697–700
- buttons, 537–538
- selection lists, 551–555
- building, 643–647, 683–685
- checking for required fields, 575–578
- conforming field values, 570–571
- handling events, 557–561
- how they work, 535
- HTML5, 536–537
- making fields mandatory, 566–567
- preventing default form submission, 562
- programming pickers, 555–557
- radio buttons, 548–551
- regular expressions, 582–589
- restricting text field length, 567–568
- setting maximum/minimum values on numeric fields, 568–569
- styling invalid fields, 571–574
- submitting
- about, 561–564
- data, 563–564
- text fields, 538–543
- triggering events, 557–561
- validating
- data in browsers, 566–574
- data on servers, 574–582
- email fields, 569
- fields based on data types, 580–581
- against patterns, 582
- text data, 578–580
- fr unit, 155
- frame subobject, 270
- frames property, 276
- front end
- creating common files, 633–634
- CSS, 12–13, 14–15
- defined, 12
- HTML, 12–13, 14–15
- FTP (File Transfer Protocol), 40, 44, 617
- FTP client, 44
- function() function, 390–391, 397
- function-level scope, 260
- functions
- about, 249–250
- advantages of using, 258
- applyFilters() function, 658–661
- arsort() function, 449
- asort() function, 449
- bin2hex() function, 628, 689
- binary() function, 617
- buildGradient() function, 764
- buildHover() function, 764
- calculateProfitSharing() function, 266
- calling, 252–255
- construct() function, 459
- countdown() function, 280
- ctype_alpha() function, 578, 614
- Date() function, 325
- defined, 178
- display_header function, 464
- document.body function, 253–254
- empty() function, 575–578
- filter_var() function, 580–581
- function() function, 390–391, 397
- generateButtonCode() function, 765, 766, 767
- getButtonValues() function, 766
- get_JSON() function, 530–532
- htmlentities() function, 613, 616
- initializeCreateDataForm() function, 647
- initializeUpdateDataForm() function, 663, 666
- isset() function, 496, 514
- json_encode() function, 528–530
- linear function, 402
- local vs. global variables, 259–262
- location of, 251
- logIt() function, 278
- mail() function, 689, 690
- monthName() function, 329
- Number() function, 234
- numericSort function, 307
- openssl_random_pseudo_bytes() function, 628, 689
- parseFloat() function, 337, 381–382
- parseInt() function, 336–337
- passing multiple values to, 257–258
- passing single values to, 256–257
- passing values to, 255–258, 457
- password_hash() function, 688
- password_verify() function, 703
- PHP, 456–458
- preg_match() function, 582
- print_r() function, 447–448
- readActivities() function, 654, 656–657
- recursive, 262–266
- returning values from, 258–259, 458
- rgb() function, 94
- rsoort() function, 448–449
- running after loads, 520–522
- session_start() function, 627
- setButtonValues() function, 767
- setting up, 307
- sort() function, 306–308, 448–449
- strlen() function, 578
- str_replace() function, 614
- structure of, 250–251
- time() function, 629
- var() function, 613
G
- generateButtonCode() function, 765, 766, 767
- generating
- app menus, 745
- back-end initialization files, 631–632
- borders, 109–110
- bulleted lists, 65–68
- Button Builder app, 740–767
- comparison expressions, 208–214
- custom classes, 459
- data, 643–652
- data handler scripts, 640–641
- databases, 624–625
- elements, 287
- external JavaScript files, 181–182
- forms, 643–647
- front-end common files, 633–634
- grid gaps, 155–156
- home pages for web apps, 635
- HTML5 web forms, 536–537
- links, 62–65
- logical expressions, 215–219
- margins, 110–113
- multidimensional arrays, 299–300, 450–451
- MySQL databases, 473–480
- MySQL tables, 477–479
- navigation menus, 418–420
- numbered lists, 65–68
- numeric expressions, 199–205
- objects, 461
- PHP expressions, 438–439
- primary keys, 479–480
- queries, 504–505
- scripts, 175–180
- SELECT queries, 481–482, 499–500
- startup files for web apps, 630–635
- string expressions, 205–207
- strings, 302–303
- tables in MySQL databases, 473–480, 624–625
- user handling script, 679–682
- web forms, 683–685
- web page accordions, 403–406
- web pages with animation, 398–410
- generic font, 90
- .get() method, 511, 523–526
- GET method, 496
- GET request
- about, 511–513
- preparing for data submission, 563
- getButtonValues() function, 766
- getDate() method, 326, 331
- getDay() method, 326, 329–330, 332
- getFullYear() method, 326, 333
- getHours() method, 326
- getItem() method, 736–737
- .getJSON(), 511
- get_JSON() function, 530–532
- getMilliseconds() method, 326
- getMinutes() method, 326
- getMonth() method, 326, 328–329, 331
- getSeconds() method, 326
- getTime() method, 326, 335
- getting started, with jQuery, 366–369
- GIF (Graphics Interchange Format), 69
- global scope, 261–262
- global variables, 259–262, 359
- glocal scope, 353
- Gmail (website), 594
- GoDaddy (website), 38
- Google (website), 594
- Google Chrome
- adding watch expressions, 354
- displaying Console in, 346
- opening web development tools in, 344
- stepping into code, 351
- stepping out of code, 352
- stepping over code, 352
- viewing all variable values, 353
- Google font, 91
- Google Maps (website), 594
- gradient effect, 752
- Graphics Interchange Format (GIF), 69
- greater than (>) operator, 208, 209, 220, 347, 439, 483
- greater than or equal (>=) operator, 208, 210, 220, 439, 483
- grid
- defined, 153
- elements in, 153–154
- laying out content columns with, 161–162
- specifying columns, 154–155
- specifying rows, 154–155
- grid container, 153, 154
- grid gaps, 155–156
- grid items
- about, 154
- aligning, 160–161
- assigning to rows/columns, 157–160
- grid template, 154
- grid-column-end, 157
- grid-column-start, 157
- grid-gap property, 156
- grid-row-end, 157
- grid-row-start, 157
- Grinstead, Brian (programmer), 741
- growing flex items, 144–146
H
- <h1…h4> tags, 61, 104
- handler, 255
- handling
- animation duration and pace, 402
- browsers, 176
- characters, 77–78
- flow of PHP code, 451–456
- JavaScript, 170–171
- JSON data returned by server, 530–532
- loop execution, 243–246
- order of precedence, 221–223
- POST requests in PHP, 513–514
- shrinkage, 148–149
- web form events, 557–561
- words, 77–78
- hard disk, mirroring, 42–44
- hashtag symbol (#), 98, 610
- head section, 53–54
- <head> tag, 54, 95
- <header> tag, 71–72, 96, 104, 105, 114, 376
- headers
- configuring, 744
- loading common, 516–517
- headings, adding, 60–61
- height, 105–106
- height() method, 381–382
- here document (heredoc) syntax, 444
- hexadecimal integer values, 191
- hh argument, 324
- hidden type, 540
- hide() method, 399, 402, 425
- hiding
- content with accordions, 422–424
- elements, 399
- highlight effect, 427
- history property, 276
- history subobject, 270
- home pages
- building for web apps, 635
- configuring, 674–677
- preparing for data, 652–654
- setting up skeleton, 741–743
- horizontal rule, 52
- horizontal space, controlling, 129
- host name, 516
- hostname property, 272
- hosts, web
- defined, 36
- finding, 35–45, 40–41
- providers, 36–40
- setting up, 35–45
- hover effect, 752
- How-To Guides link, 28, 32
- <hr> tag, 52
- HTML (HyperText Markup Language)
- about, 12–13, 14–15, 49
- absolute positioning, 124
- applying basic text tags, 58–62
- assigning grid items to rows/columns, 159
- basics of, 50–51
- building bulleted lists, 65–68
- building numbered lists, 65–68
- Button Builder app, 741–754
- centering elements, 142
- collapsing
- containers, 119
- margins, 112–113
- controlling horizontal space, 130
- converting
- into day names getDay() method, 329
- getMonth() method into month names, 328
- creating
- links, 62–65
- web page accordions, 403–405
- defined, 13
- delegating events, 396
- determining age, 333
- displaying messages to users, 177
- fixed positioning, 125–126
- getting data about events, 393–394
- inline blocks for macro page layouts, 135–136
- inserting
- images, 69–71
- special characters, 68–69
- keywords, 194–195
- laying out
- content columns with flexbox, 150–151
- content columns with Grid, 162
- navigation bar with flexbox, 143–144
- listening for element changes, 561
- manipulating attributes with jQuery, 385–386
- page elements with inline blocks, 133–134
- page structure, 71–78
- preventing default event action, 395
- relative positioning, 121–122
- replacing in elements, 375–376
- running code after animation ends, 409
- setting
- dates, 331
- focus, 558
- setting up
- event handler, 390
- flex container, 138–139
- shrinking flex items, 147
- specfiying grid rows/columns, 155
- structure
- of HTML5 web pages, 53–57
- vs. style, 57–58
- web pages with, 49–78
- styling invalid fields, 572–573
- using jQuery's shortcut event handlers, 391, 392
- HTML files, 436, 515–516
- html() method, 375–376
- HTML tags, 422
- HTML viewer tab, 344, 345
- <html> tag, 95
- HTML5 web forms, 536–537
- htmlentities() function, 613, 616
- hue, 753
- Hypertext, 50
- HyperText Markup Language (HTML)
- about, 12–13, 14–15, 49
- absolute positioning, 124
- applying basic text tags, 58–62
- assigning grid items to rows/columns, 159
- basics of, 50–51
- building
- bulleted lists, 65–68
- numbered lists, 65–68
- Button Builder app, 741–754
- centering elements, 142
- collapsing
- containers, 119
- margins, 112–113
- controlling horizontal space, 130
- converting
- into day names getDay() method, 329
- getMonth() method into month names, 328
- creating
- links, 62–65
- web page accordions, 403–405
- defined, 13
- delegating events, 396
- determining age, 333
- displaying messages to users, 177
- fixed positioning, 125–126
- getting data about events, 393–394
- inline blocks for macro page layouts, 135–136
- inserting
- images, 69–71
- special characters, 68–69
- keywords, 194–195
- laying out
- content columns with flexbox, 150–151
- content columns with Grid, 162
- navigation bar with flexbox, 143–144
- listening for element changes, 561
- manipulating attributes with jQuery, 385–386
- page elements with inline blocks, 133–134
- page structure, 71–78
- preventing default event action, 395
- relative positioning, 121–122
- replacing in elements, 375–376
- running code after animation ends, 409
- setting
- dates, 331
- focus, 558
- setting up
- event handler, 390
- flex container, 138–139
- shrinking flex items, 147
- specfiying grid rows/columns, 155
- structure
- of HTML5 web pages, 53–57
- vs. style, 57–58
- web pages with, 49–78
- styling invalid fields, 572–573
- using jQuery's shortcut event handlers, 391, 392
- hypertext reference, 63
- hyphen (-), 407
I
- <i> tag, 59
- icons, explained,
- id attribute, 64, 278, 279, 284–285
- id selector, 97, 98, 370
- IDE (integrated development environment), 22
- identifiers, 482
- identity (===) operator, 208, 212, 220, 358–359, 439
- if() statements
- about, 392
- decision-making with, 452–453
- making true/false statements with, 226–227
- nesting, 230–231
- if()…else statements, 228–229
- image object, 270
- images
- delivering responsively, 732–733
- formats for, 69
- inserting, 69–71
- making responsive, 731–732
- in mobile-first web development, 726, 731–733
- <img> tag, 70, 116–117, 124
- importing data into MySQL, 471–473
- IN operator, 484
- including jQuery in web pages, 366–368
- incorporating query string values in queries, 501–504
- increment (++) operator, 199, 200–201, 220, 438
- incrementing, 239
- incrementing the value, 200–201
- indenting
- code, 355–356
- paragraph's first line, 92–93
- index number, 293
- indexOf() method, 313–314
- infinite loops, avoiding, 246–247
- infinite recursion, avoiding, 265–266
- Infinity result, 203
- inheritance, CSS and, 100
- initializeCreateDataForm() function, 647
- initializeUpdateDataForm() function, 663, 666
- inline blocks, 107, 128, 132–136
- inline elements, 77–78, 113
- inline styles, 83–84
- inner join, 485–490
- innerHeight property, 276
- innerWidth property, 276
- <input> tag, 394, 537, 543–548, 548–551, 550, 567–568, 763
- INSERT query, 481, 490–491
- inserting
- array elements, 308–310
- elements in arrays, 310
- images, 69–71
- inline styles, 83–84
- queries, 504–505
- special characters, 68–69
- insertion task, 309
- installing
- XAMPP, 24–26
- XAMPP for OS X, 29–30
- instancing, 458, 461
- integers
- defined, 189, 336
- hexadecimal integer values, 191
- integrated development environment (IDE), 22
- interactions
- applying, 428–429
- jQuery UI, 428–431
- as a jQuery UI category, 412
- user, 280–284
- using, 429–431
- internal links, 63–65
- internal style sheets, embedding, 84–86
- Internet resources
- Alphabet, 594
- Apache Friends, 24
- Brackets, 34
- CNET Web Hosting Solutions, 41
- Coda, 44
- CuteFTP, 44
- Cyberduck, 44
- examples in this book,
- FileZilla, 44
- Gmail, 594
- GoDaddy, 38
- Google, 594
- Google Maps, 594
- jQuery Mobile icons, 744
- JSONLint, 528
- PC Magazine Web Site Hosting Services Reviews, 41
- phpMyAdmin, 470, 624
- Register, 38
- Review Hell, 41
- Review Signal Web Hosting Reviews, 41
- ThemeRoller page, 415
- Transmit, 44
- uploading files for, 44–45
- Web Coding Playground, , 93
- Web Hosting Talk, 40
- XAMPP Dashboard, 470
- YouTube, 594
- Internet service provider (ISP), 36–37
- interpolating, 443
- intervals, JavaScript, 276–280
- Invoice class, 459
- IS NULL operator, 484
- ISP (Internet service provider), 36–37
- isset() function, 496, 514
- italic control, 749
- italicizing text, 91
J
- JavaScript
- abilities of, 173–174
- about, 16–17, 169–170, 225, 510
- adding comments to code, 180
- as an event-driven language, 388
- arithmetic operators, 199
- avoiding infinite loops, 246–247
- braces ({}), 227
- Button Builder app, 757–767
- case-sensitivity of, 357
- code looping, 234–235
- comparison operators, 208
- constructing scripts, 175–180
- control structures, 226
- controlling
- about, 170–171
- loop execution, 243–246
- converting
- into day names getDay() method, 330
- getMonth() method into month names, 329
- creating external files, 181–182
- determining age, 333
- do…while() loops, 241–242
- errors, 342–343, 356–359, 359–361
- escape sequences, 192
- extracting information about dates, 326–327
- for() loops, 237–241
- getting started, 175
- handling browser without, 176
- if()…else statements, 228–229
- inabilities of, 174
- intervals, 276–280
- joining with Ajax and JSON, 509–532
- keywords, 194–195
- learning difficulty of, 172–173
- logical operators, 215
- making multiple decisions, 229–234
- making true/false decisions with if() statements, 226–227
- object hierarchy, 269–270
- order of precedence, 220–221
- reserved words, 188, 193–194
- setting dates, 331
- switch() statement, 231–234
- time in, 322
- timeouts, 276–280
- while() loops, 235–237
- JavaScript Object Notation (JSON)
- about, 526–528
- characteristics of, 526–527
- converting server data to, 528–530
- declaring variables, 527–528
- handling data returned by server, 530–532
- joining PHP and JavaScript with Ajax and, 509–532
- returning Ajax data as text in, 528–532
- syntax for, 526–527
- join() method, 302–303
- Joint Photographic Experts Group (JPEG), 69–70
- jQuery
- about, 17, 365
- adding elements in, 374–375
- basic selectors, 370–371
- Button Builder app, 757–767
- defined, 366
- delegating events, 396
- getting data about events, 394
- getting started, 366–369
- including in web pages, 366–368
- listening for element changes, 561
- location for code, 368–369
- making Ajax calls with, 511–526
- manipulating
- HTML attributes with, 385–386
- page elements with, 373–377
- modifying CSS with, 377–385
- preventing default event action, 395
- removing elements, 377
- running code after animation ends, 409–410
- selecting elements with, 369–373
- sets, 371–373
- setting focus, 558
- setting up event handler, 390
- using jQuery's shortcut event handlers, 391, 392
- using shortcut event handlers, 391–393
- jQuery Mobile, 729–731
- jQuery Mobile Collapsible widget, 746
- jQuery Mobile FlipSwitch widgets, 752
- jQuery Mobile icons (website), 744
- jQuery UI
- about, 411–412
- effects, 424–428
- getting started, 413–415
- interactions, 428–431
- working with widgets, 415–424
- JSON
- about, 526–528
- characteristics of, 526–527
- converting server data to, 528–530
- declaring variables, 527–528
- handling data returned by server, 530–532
- joining PHP and JavaScript with Ajax and, 509–532
- returning Ajax data as text in, 528–532
- syntax for, 526–527
- json_encode() function, 528–530
- JSONLint (website), 528
- justify-content property, 139–140
- justify-self property, 160
K
- keyboard events, 389
- keywords
- about, 60
- HTML, 194–195
- JavaScript, 194–195
L
- <label>, 541, 550
- landmarks, 607
- Language, 50
- last filter, 373
- lastIndexOf() method, 313–314
- left property, 121
- length property, 300–301, 312–313
- less than (<) operator, 208, 209–210, 220, 439, 483
- less than or equal (<=) operator, 208, 210–211, 220, 439, 483
- letter spacing control, 749
- <li> tag, 65
- library, 17, 366
- LIKE operator, 483
- line breaks, adding, 440–441
- line numbers, in text editors, 33, 34
- linear function, 402
- link object, 270
- <link> tag, 86–87
- links
- creating, 62–65
- to external style sheets, 86–87
- internal, 63–65
- styling, 91–92
- Linux, 39
- liquid layout, for web apps, 601
- listening for element changes, 560–561
- literals
- array, 296
- Boolean, 193
- defined, 189
- numeric, 189–191
- string, 191–193
- .load() method, 511
- loading
- common headers/footers, 516–517
- HTML files, 515–516
- output from PHP scripts, 517–518
- page fragments, 518–519
- running functions after loads, 520–522
- sending data to servers, 519–520
- updating elements with server data using, 514–522
- loading
- common headers/footers, 516–517
- HTML files, 515–516
- output from PHP scripts, 517–518
- page fragments, 518–519
- load-time errors, 342
- Local Lane route, 535
- local scope, 260–261, 353
- local variables, 259–262, 359
- local web development environment
- defined, 22
- needs for, 22–23
- local web servers, accessing, 27–29, 31–33
- localStorage property, 276, 735
- location property, 271, 272, 276
- location subobject, 270
- log() method, 339
- logging data to Console, 346–347
- logic errors, 343
- logical expressions, building, 215–219
- logical operators, 439, 484–485
- logIt() function, 278
- loop counter, 238
- loop execution, controlling, 243–246
- loop statements, bypassing using the continue statement, 245–246
- loops/looping
- with do…while() loops, 456
- with for() loops, 455
- populating arrays using, 296–297
- through query results, 501
- with while() loops, 454–455
- working with array data using, 297–299
- lossy compression, 69–70
- luminance, 753
M
- macro level, 128
- Macs
- configuring php.ini for debugging, 463
- displaying Console on, 346
- inserting special characters, 68
- opening web development tools in, 344
- setting up public subdirectory, 621
- magic constants, 466
- mail() function, 689, 690
- <main> tag, 73, 96
- Manage Servers tab, 31
- managing
- animation duration and pace, 402
- browsers, 176
- characters, 77–78
- flow of PHP code, 451–456
- JavaScript, 170–171
- JSON data returned by server, 530–532
- loop execution, 243–246
- order of precedence, 221–223
- POST requests in PHP, 513–514
- shrinkage, 148–149
- web form events, 557–561
- words, 77–78
- manipulating
- classes, 382–385
- HTML attributes with jQuery, 385–386
- page elements with jQuery, 373–377
- properties, 271–273
- text with String object, 311–323
- web pages, 268
- margin property, 110–111
- margins
- as a box component, 104
- collapsing, 111–113
- creating, 110–113
- resetting, 111
- MariaDB, 23, 29
- marking text, 59–60
- Markup, 50
- master table, 639
- Math object, about, 269
- about, 335–336
- converting between strings and numbers, 336–338
- methods, 338–339
- properties, 338–339
- max() method, 339
- measurement units (CSS), 88–89
- media query, 603
- menu separator, 418
- menu widget, 422
- messages
- displaying in dialogs, 420–422
- displaying to users, 177–179
- displaying using alert() method, 280–281
- <meta> tag, 68
- metaKey property, 393
- methods
- abs() method, 339
- addClass() method, 382–383, 384–385, 385–386, 522
- adding to classes, 460–461
- alert() method, 178, 207, 245, 280–281, 283
- animate() method, 406–408, 410
- append() method, 374–375, 375–376
- associated with objects, 268
- attr() method, 385–386
- back() method, 274
- blur() method, 392, 559–560
- cell() method, 339
- charAt() method, 316–317
- charCodeAt() method, 316
- clearInterval() method, 279, 280
- clearTimeout() method, 278
- .click() method, 557–561
- close() method, 499
- concat() method, 301–302
- confirm() method, 274, 281–282, 283
- console.log() method, 247, 261, 346–347
- console.table() method, 346–347
- cos() method, 339
- createData() method, 649–652
- createUser() method, 686, 689–690
- css() method, 372, 378–382
- Date object, 326, 330
- dbclick() method, 392
- defined, 178
- deleteData() method, 672
- deleteUser() method, 716–719
- effect() method, 424–425
- exp() method, 339
- extracting substrings with, 315–323
- fadeIn() method, 400, 402
- fadeOut() method, 400, 402
- fadeToggle() method, 400, 402, 405
- filter() method, 658–661
- .first() method, 551
- floor() method, 339
- focus() method, 558–559
- .get() method, 511, 523–526
- GET method, 496
- getDate() method, 326, 331
- getDay() method, 326, 329–330, 332
- getFullYear() method, 326, 333
- getHours() method, 326
- getItem() method, 736–737
- getMilliseconds() method, 326
- getMinutes() method, 326
- getMonth() method, 326, 328–329, 331
- getSeconds() method, 326
- getTime() method, 326, 335
- height() method, 381–382
- hide() method, 399, 402, 425
- html() method, 375–376
- indexOf() method, 313–314
- join() method, 302–303
- jQuery, 372
- lastIndexOf() method, 313–314
- .load() method
- about, 511
- loading common headers/footers, 516–517
- loading HTML files, 515–516
- loading output from PHP scripts, 517–518
- loading page fragments, 518–519
- running functions after loads, 520–522
- sending data to servers, 519–520
- updating elements with server data using, 514–522
- log() method, 339
- Math object, 338–339
- max() method, 339
- min() method, 339
- object, 273–275, 462
- off() method, 398
- on() method, 390–391, 397
- pop() method, 303, 522
- .post() method, 511, 523–526
- pow() method, 339
- prepend() method, 374–375, 375–376
- preventDefault() method, 394–395, 562
- prompt() method, 234, 236, 282–283
- push() method, 303–304
- query() method, 499–500, 500–501
- querySelectorAll() method, 286–287, 372
- random() method, 339
- readAllData() method, 655–656
- readDataItem() method, 664
- ready() method, 654
- remove() method, 377
- removeAttr() method, 386
- removeClass() method, 383–384, 384–385, 385–386
- removeItem() method, 737
- reverse() method, 304–305
- round() method, 339
- sendPasswordReset() method, 706–713
- setDate() method, 330, 332, 334
- setFullYear() method, 330, 332, 333
- setHours() method, 330
- setInterval() method, 278, 279
- setItem() method, 735–736, 766
- setMilliseconds() method, 330
- setMinutes() method, 330
- setMonth() method, 330, 332, 334
- setSeconds() method, 330
- setTime() method, 330
- shift() method, 305
- show() method, 399, 402, 425
- signInUser() method, 700–703
- sin() method, 339
- slice() method, 305–306, 316, 318
- slideDown() method, 401, 402
- slideToggle() method, 401, 402, 405, 406, 410
- slideUp() method, 401, 402
- splice() method, 308–310, 322–323
- split() method, 316, 318–320
- sqrt() method, 339
- String object, 313, 316
- substr() method, 316, 320–321, 322–323
- substring() method, 316, 321–322, 322–323
- tan() method, 339
- text() method, 376, 554
- toggle() method, 399, 402, 425
- toggleClass() method, 384–385, 385–386
- unshift() method, 310
- updateData() method, 667
- val() method, 542–543, 546–547
- verifyUser() method, 691–695, 708
- width() method, 381–382
- micro level, 128
- Microsoft Edge
- displaying Console in, 346
- opening web development tools in, 344
- min() method, 339
- min-height property, 151, 162
- mirroring hard disk, 42–44
- Missing ( error message, 359
- Missing ; error message, 360
- Missing { error message, 359–360
- Missing } error message, 360
- mixing quotation marks, 441–442
- mm argument, 324
- mobile web apps
- about, 19–20, 739–740
- adding app controls, 745–754
- building Button Builder app, 740–767
- creating menus, 745
- web help, 741
- mobile-first web development
- about, 20, 723–724
- images, 731–733
- jQuery Mobile, 729–731
- principles of, 725–729
- storing user data in browsers, 734–737
- modal dialog, 668
- modifying
- CSS with jQuery, 377–385
- element styles, 288–289
- selected options, 555
- table data with UPDATE query, 491
- values of properties, 273
- web files, 45
- modulus (%) operator, 199, 204, 220, 438
- monitoring
- blur events, 560
- focus events, 559
- script values, 352–355
- month argument, 324
- month picker, 557
- monthName() function, 329
- motor impairments, 606
- mouse events, 389
- moving data to web pages, 469
- Mozilla Firefox
- adding watch expressions, 354
- displaying Console in, 346
- opening web development tools in, 344
- stepping into code, 351
- stepping out of code, 352
- stepping over code, 352
- viewing all variable values, 354
- ms argument, 324
- mth argument, 324
- multidimensional arrays, creating, 299–300, 450–451
- multiple arguments, 257
- multiplication (*) operator, 198, 199, 202, 220, 438, 586–587
- MySQL. See also PHP
- about, 15–16
- backing up data, 473
- importing data into, 471–473
- role of in web apps, 494–495
- separating login credentials, 505–506
- using PHP to access data in, 493–505
- MySQL databases
- about, 468–469
- connecting to, 497–499
- creating, 473–480
- creating tables, 473–480
- phpMyAdmin, 470–473
- queries, 469–470
- querying data, 480–492
- tables, 468–469
- MySQL tables
- adding data to, 479
- creating, 477–479
- MySQLi (MySQL Improved), 497–499
N
- {n} symbol, 587
- {n,} symbol, 587–588
- naming variables, 187–189
- <nav> tag, 72–73, 96, 114
- navigating web home, 41–45
- navigation bar
- laying out with flexbox, 143–144
- for mobile-first web development, 726
- navigation menus, creating, 418–420
- navigator property, 276
- negation (-) operator, 199, 201–202, 220, 438
- nesting
- if() statements, 230–231
- tags, 60
- Network tab, 345
- newline character, 441
- symbol, 588
- non-identity (!==) operator, 208, 212–213, 220, 439
- “non-mobile” breakpoints, choosing, 727–729
- non-semantic content, 76–77
- <noscript> tag, 176
- not equal (!=) operator, 208, 209, 220, 439
- not equal (<>) operator, 483
- not() filter, 373
- NOT (!) operator, 215, 217, 220, 439, 485
- Notepad++ (website), 34
- no-width layout, for web apps, 600
- null string, 191
- Number() function, 234
- Number object, 269
- number type, 539
- numbered lists, building, 65–68
- numbers
- converting between strings and, 336–338
- floating-point, 336
- working with. See Math object
- numeric expressions, 199–205
- numeric literals, 189–191
- numericSort function, 307
O
- object methods, 273–275, 462
- object properties, 272–273, 461–462
- objects
- about, 267–269
- actions, 273–274
- anchor object, 270
- array, 300–310
- creating, 461
- Date object. See also dates
- about, 269
- arguments with, 324
- extracting information about dates, 325–328
- methods, 326, 330
- setting dates, 330–332
- working with, 324–325
- document subobject, 270
- Event object, 393–394
- form object, 270
- frame subobject, 270
- hierarchy of, 269–270
- history subobject, 270
- image object, 270
- link object, 270
- location subobject, 270
- manipulating properties, 271–273
- Math object
- about, 269, 335–336
- converting between strings and numbers, 336–338
- methods, 338–339
- properties, 338–339
- object methods, 273–275, 462
- PHP, 458–462
- programming document objects, 284–290
- as properties, 272–273, 461–462
- rolling, 458–461
- String object
- about, 269
- determining length of, 312–313
- manipulating text with, 311–323
- methods, 313, 316
- window, 275–284
- window object, 270, 735
- objectsXMLHttpRequest object, 512
- odd filter, 373
- off() method, 398
- offset-image class, 122
- offsets, 121
- <ol> tag, 67
- on() method, 390–391, 397
- onclick attribute, 255, 256
- one-dimensional arrays, 299
- on/off decision, 226
- openssl_random_pseudo_bytes() function, 628, 689
- operands, 198, 211, 482
- operating system, as a web hosting consideration, 39
- operator precedence, 219–223
- operators
- about, 198, 482
- addition (+) operator, 199, 200, 220, 337–338, 438, 439, 587
- AND (&&) operator, 215–216, 217–219, 220, 230, 439, 485
- arithmetic assignment operators, 199–200, 204–205
- arithmetic operators, 199–200, 438
- BETWEEN…AND operator, 484
- comparison operators, 211–212, 439, 482–484
- decrement (--) operator, 199, 202, 220, 239, 438
- division (/) operator, 199, 202–204, 220, 438
- equal (=) operator, 439, 483
- equality operator (==), 208–209, 220, 358–359
- exponentiation (**) operator, 438
- greater than (>) operator, 208, 209, 220, 347, 439, 483
- greater than or equal (>=) operator, 208, 210, 220, 439, 483
- identity (===) operator, 208, 212, 220, 358–359, 439
- increment (++) operator, 199, 200–201, 220, 438
- IS NULL operator, 484
- less than (<) operator, 208, 209–210, 220, 439, 483
- less than or equal (<=) operator, 208, 210–211, 220, 439, 483
- LIKE operator, 483
- logical operators, 439, 484–485
- modulus (%) operator, 199, 204, 220, 438
- multiplication (*) operator, 198, 199, 202, 220, 438, 586–587
- negation (-) operator, 199, 201–202, 220, 438
- non-identity (!==) operator, 208, 212–213, 220, 439
- not equal (!=) operator, 208, 209, 220, 439
- not equal (<>) operator, 483
- NOT (!) operator, 215, 217, 220, 439, 485
- IN operator, 484
- OR (||) operator, 215, 216–217, 217–219, 220, 230, 439, 485
- post-decrement operator, 203, 438
- post-increment operators, 201, 438
- pre-decrement operator, 203, 438
- pre-increment operators, 201, 438
- property access operator, 271
- strict equality operator, 212
- strict inequality operator, 212
- subtraction (-) operator, 199, 201–202, 220, 438
- ternary (?:) operator, 214, 221
- <option> tag, 551–555
- OR (||) operator, 215, 216–217, 217–219, 220, 230, 439, 485
- order of precedence, 220–223
- ordered list, 67
- ordering array elements, 306–308
- orders table, 476–477
- orders_details table, 477
- organization, of directory structure, 620
- OS X
- installing XAMPP for, 29–30
- setting up XAMPP for, 29–33
- outer join, 490
- outgoing data, 616
- outputting
- array values, 447–448
- long strings, 443–445
- text/tags, 439–445
- variables in strings, 442–443
P
- p element, 14
- <p> tag, 76, 104, 106, 405
- pace, of animation, 402
- padding
- adding, 107–108
- as a box component, 104
- resetting, 111
- padding property, 108
- page elements
- about, 103–104
- adding padding, 107–108
- creating
- borders, 109–110
- margins, 110–113
- CSS Box Model, 104–105
- floating elements, 115–120
- with floats, 128–132
- with inline blocks, 132–136
- page flow, 113–114
- positioning, 120–126
- styling sizes, 105–106
- page flow, 113–114
- page footer, 75–76
- page header, 71–72
- page layout
- about, 127–128
- fallbacks for, 164–165
- flexible layouts with Flexbox, 136–153
- levels of, 128
- page elements
- with floats, 128–132
- with inline blocks, 132–136
- shaping with CSS Grid, 153–164
- page-level scope, 261–262
- pages
- adding
- elements to, 287–290
- styles to, 83–87
- titles to, 54–56
- appearance of in web apps, 598–599
- building
- accordions, 403–406
- with animation, 398–410
- reactive pages with events, 388–398
- calling functions after loading, 253–254
- family, 95–96
- including jQuery in, 366–368
- loading fragments, 518–519
- manipulating, 268
- moving data to, 469
- requirements for web apps, 597–598
- structure of, 71–78
- structure of HTML5, 53–57
- structuring with HTML, 49–78
- styling text, 87–93
- styling with CSS, 79–101
- writing text to, 179–180
- pageX property, 393
- pageY property, 393
- paragraph text, aligning, 92
- parameterized statements/queries, 614–616
- parameters, 250
- parent element, 96
- parentheses
- mismatched, 357
- missing, 358
- using in expressions, 222–223
- parseFloat() function, 337, 381–382
- parseInt() function, 336–337
- parsing
- calling functions whtn <script> tag is, 252–253
- query strings, 495–497
- passing
- defined, 255
- values to functions, 255–258, 457
- password type, 540
- password_hash() function, 688
- passwords
- resetting, 704–713
- securing, 617–618
- password_verify() function, 703
- patterns
- matching, 570
- validating against, 582
- pausing code, 348–350
- PC Magazine Web Site Hosting Services Reviews (website), 41
- performing
- complex date calculations, 334
- date calculations, 332–335
- PHP. See also MySQL
- about, 15–16, 24, 29, 435
- accessing error log, 464–465
- arrays, 445–451
- building expressions, 438–439
- constants, 626–627
- controlling flow of code, 451–456
- debugging, 463–466
- functions, 456–458
- handling POST requests in, 513–514
- how scripts work, 436
- joining with Ajax and JSON, 509–532
- loading output from scripts, 517–518
- objects, 458–462
- outputting text/tags, 439–445
- role of in web app, 494–495
- scripts syntax, 436–438
- sessions, 627, 628–629
- using to access MySQL data, 493–505
- variables, 438
- PHP files, 436
- PHP processor, 436
- PHPInfo link, 28, 33
- php.ini, configuring for debugging, 463–464
- phpMyAdmin, 24, 29, 33, 470–473, 624
- pickers, programming, 555–557
- pixel (px), 89
- planning web apps, 595–599
- plug-ins, 412
- PNG (Portable Network Graphics), 70
- point (pt), 89
- pop() method, 303, 522
- populating
- arrays, 295–296
- arrays using loops, 296–297
- arrays with data, 294–299
- port number, 516
- Portable Network Graphics (PNG), 70
- position property, 120–126
- positioning
- absolute, 122–124
- as a box component, 104
- context, 123
- fixed, 125–126
- page elements, 120–126
- relative, 121–122
- .post() method, 511, 523–526
- POST request
- about, 496, 511–513
- handling in PHP, 513–514
- preparing for data submission, 563
- post-decrement operator, 203, 438
- post-increment operators, 201, 438
- pow() method, 339
- <pre> tag, 448
- precedence, operator, 219–223
- pre-decrement operator, 203, 438
- preg_match() function, 582
- pre-increment operators, 201, 438
- prepared statements, 614–616
- preparing data for submission, 563
- prepend() method, 374–375, 375–376
- preventDefault() method, 394–395, 562
- preventing default event action, 394–395
- primary axis, 137, 139–140
- primary keys, 476, 479–480
- print command, 439
- print_r() function, 447–448
- private subdirectory, setting up, 623–624
- programming
- document objects, 284–290
- pickers, 555–557
- programming language
- about, 171–172
- client-side, 174
- JavaScript as a, 171
- progressive enhancement, 164, 724
- prompt() method, 234, 236, 282–283
- properties
- adding to classes, 459–460
- align-self property, 161
- background-color property, 94–95
- border property, 109–110
- bottom property, 121
- Cascading Style Sheet (CSS), 378–382, 406–408
- changing values of, 273
- clear property, 117
- color property, 94
- column (flex-direction property), 137
- column-reverse (flex-direction property), 137
- console property, 276
- customer_id property, 462
- defined, 14, 407
- document property, 276
- flex property, 152
- flex-direction property, 137
- flex-grow property, 144–146
- flex-shrink property, 146–149
- float property, 115–120
- font-family property, 14, 88
- font-size property, 14, 88
- font-style property, 88
- font-weight property, 88
- frames property, 276
- grid-gap property, 156
- history property, 276
- hostname property, 272
- innerHeight property, 276
- innerWidth property, 276
- justify-content property, 139–140
- justify-self property, 160
- left property, 121
- length property, 300–301, 312–313
- localStorage property, 276, 735
- location property, 271, 272, 276
- manipulating, 271–273
- margin property, 110–111
- Math object, 338–339
- metaKey property, 393
- min-height property, 151, 162
- navigator property, 276
- of objects, 268
- objects as, 272–273, 461–462
- padding property, 108
- pageX property, 393
- pageY property, 393
- position property, 120–126
- referencing, 271–272
- right property, 121
- row (flex-direction property), 137
- row-reverse (flex-direction property), 137
- scrollX property, 276
- scrollY property, 276
- sessionStorage property, 276, 735
- shiftKey property, 393
- target property, 393
- text-align property, 88, 92
- text-declaration property, 88
- text-indent property, 88, 92–93
- top property, 121
- which property, 393
- width property, 14
- window objects, 275–276
- window property, 272
- properties parameter, 407
- property access operator, 271
- property-value pair, 82
- proprietary upload tools, 45
- protocol, 516
- providers, Internet, 36–37
- pseudo-element, 119
- pt (point), 89
- public subdirectory, setting up, 621–623
- puff effect, 427
- pulsate effect, 427
- push() method, 303–304
- px (pixel), 89
Q
- queries
- creating, 504–505
- criteria for, 482–485
- defined, 480
- deleting, 504–505
- incorporating query string values in, 501–504
- inserting, 504–505
- multiple tables, 485–490
- MySQL data, 480–492
- MySQL databases, 469–470
- running, 504–505
- storing results in arrays, 500–501
- types of, 480–481
- updating, 504–505
- query() method, 499–500, 500–501
- query strings
- defined, 494
- parsing, 495–497
- sending, 496
- querySelectorAll() method, 286–287, 372
- quotation marks, 191–192, 357, 407, 441–442
- quotations, adding, 61–62
R
- radio buttons
- about, 548–551
- getting state, 550
- as mandatory fields, 567
- setting state, 551
- random() method, 339
- RDBMS (relational database management system), 468, 476–477
- RE (regressive enhancement), 724
- reactive pages, building with events, 388–398
- readActivities() function, 654, 656–657
- readAllData() method, 655–656
- readDataItem() method, 664
- reading
- attribute values, 385
- CSS property value, 378–379
- data, 652–661
- “read-only” properties, 273
- ready() method, 654
- recursion
- defined, 262
- use of, 263
- recursive functions, 262–266
- referencing
- checkboxes, 546
- properties, 271–272
- radio buttons, 549–550
- selection lists, 554
- text fields by field type, 542
- window objects, 275
- Register (website), 38
- regressive enhancement (RE), 724
- regular domain name, 38
- regular expressions, 570, 571, 582–589
- relating tables, 476–477
- relational database management system (RDBMS), 468, 476–477
- relative, 120
- relative positioning, 121–122
- relative unit, 89
- rem (root em), 89
- Remember icon,
- remove() method, 377
- removeAttr() method, 386
- removeClass() method, 383–384, 384–385, 385–386
- removeItem() method, 737
- removing
- array elements, 303, 305, 308–310
- attributes, 386
- breakpoint, 349
- classes, 383–384
- data, 668–672
- data from web storage, 737
- elements in jQuery, 377
- queries, 504–505
- table data with DELETE query, 492
- users, 714–719
- watch expressions, 355
- replacement task, 309
- replacing
- array elements, 308–310
- element's HTML, 375–376
- require statement, 505
- reserved words, 188, 193–194
- “reset” feature, 758
- resetting
- CSS to default, 767
- margins, 111
- padding, 111
- passwords, 704–713
- resizable interaction, 430
- resources, Internet
- Alphabet, 594
- Apache Friends, 24
- Brackets, 34
- CNET Web Hosting Solutions, 41
- Coda, 44
- CuteFTP, 44
- Cyberduck, 44
- examples in this book,
- FileZilla, 44
- Gmail, 594
- GoDaddy, 38
- Google, 594
- Google Maps, 594
- jQuery Mobile icons, 744
- JSONLint, 528
- PC Magazine Web Site Hosting Services Reviews, 41
- phpMyAdmin, 470, 624
- Register, 38
- Review Hell, 41
- Review Signal Web Hosting Reviews, 41
- ThemeRoller page, 415
- Transmit, 44
- uploading files for, 44–45
- Web Coding Playground, , 93
- Web Hosting Talk, 40
- XAMPP Dashboard, 470
- YouTube, 594
- responsive images, for web apps, 604–605
- responsive typography, for web apps, 605
- responsiveness, of web apps, 599–605
- restricting text field length, 567–568
- return statement, 259, 458
- returning
- Ajax data as JSON text, 528–532
- subsets of arrays, 305–306
- values from functions, 458
- reverse() method, 304–305
- reversing array elements order, 304–305
- Review Hell (website), 41
- Review Signal Web Hosting Reviews (website), 41
- RGB code, 94
- rgb() function, 94
- right property, 121
- rolling objects, 458–461
- root directory, 41
- root em (rem), 89
- round() method, 339
- rounded corners, for buttons, 538
- row (flex-direction property), 137
- row-reverse (flex-direction property), 137
- rows, assigning assigning to, 157–160
- rsoort() function, 448–449
- rules
- Cascading Style Sheets (CSS), 81–83
- for naming variables, 187–188
- in programming languages, 171
- running
- code, 408–410, 765
- code after animaton ends, 408–410
- functions after loads, 520–522
- queries, 504–505
- SELECT query, 499–500
- XAMPP Application Manager, 30–31
- XAMPP for Windows Control Panel, 26–27
- runtime errors, 342–343
S
- s symbol, 584
- S symbol, 584
- Safari
- displaying Console in, 346
- opening web development tools in, 344
- same precedence, 221
- same-origin policy, 516
- sanitizing incoming data, 612–614
- saturation, 753
- saving custom CSS, 765–766
- scalability, as a web hosting consideration, 40
- scale effect, 427
- scaling content, 726–727
- scope
- defined, 259–260, 353
- global, 261–262, 353
- local, 260–261, 353
- <script> tag, 175–176, 176–177, 250
- calling functions when parsing, 252–253
- scripts
- constructing, 175–180
- data handler, 640–641
- monitoring values, 352–355
- PHP, 436–438
- scrollX property, 276
- scrollY property, 276
- search type, 540
- secondary axis, 137, 140–141
- <section> tag, 74–75, 104, 114, 405, 660
- security
- of directory structure, 620
- PHP sessions, 628–629
- for web apps, 608–618
- SELECT query
- about, 481
- creating, 481–482, 499–500
- running, 499–500
- <select> tag, 551–555, 763
- selectable interaction, 431
- selecting
- elements with jQuery, 369–373
- “non-mobile” breakpoints, 727–729
- text editors, 33–34
- selection lists
- adding, 551–555
- getting options, 554–555
- as mandatory fields, 567
- referencing, 554
- selectors
- Cascading Style Sheet (CSS), 96–100
- specifying elements by, 286–287
- semantic elements, 76
- semantically, 58
- semicolon (;), 178, 347
- sending
- data to servers, 519–520, 685–688
- form data to servers, 648–649
- query strings, 496
- verification emails, 688–689
- sendPasswordReset() method, 706–713
- separating MySQL login credentials, 505–506
- server data, converting to JSON format, 528–530
- Server Street route, 535
- servers
- accessing data on, 16
- adding files/folders to, 28, 32
- communicating
- with .get() method, 523–526
- with .post() method, 523–526
- defined, 36
- handling JSON data returned by, 530–532
- sending
- data to, 519–520, 685–688
- form data to, 648–649
- storing data on, 16
- validating web form data on, 574–582
- viewing files/folders on, 28, 32
- server-side, 174
- sessions (PHP), 627, 628–629
- session_start() function, 627
- sessionStorage property, 276, 735
- setButtonValues() function, 767
- setDate() method, 330, 332, 334
- setFullYear() method, 330, 332, 333
- setHours() method, 330
- setInterval() method, 278, 279
- setItem() method, 735–736, 766
- setMilliseconds() method, 330
- setMinutes() method, 330
- setMonth() method, 330, 332, 334
- sets (jQuery), 371–373
- setSeconds() method, 330
- setTime() method, 330
- setTimeout(), 277
- setting
- attribute values, 385–386
- breakpoint, 349
- checkbox state, 547–548
- CSS property value, 379–380
- dates, 330–332
- focus, 558
- maximum/minimum values on numeric fields, 568–569
- multiple CSS property values, 380–381
- radio button state, 551
- text field values, 542–543
- type size, 87–88
- viewport, 601
- setup
- app control values, 758–760, 761–763
- app data structure, 757–758
- back end of web apps, 677–682
- directory structure, 620–624
- event handlers, 390–391
- flex container, 137–139
- functions, 307
- grid container, 154
- home page skeleton, 741–743
- private subdirectory, 623–624
- public subdirectory, 621–623
- web forms, 536
- web hosts, 35–45
- XAMPP for OS X development environment, 29–33
- XAMPP for Windows Development Environment, 23–29
- shake effect, 427
- shared server, as a web hosting consideration, 39
- sheets (CSS), 80–81
- shift() method, 305
- shiftKey property, 393
- shopping script, 40
- show() method, 399, 402, 425
- showing
- Console in browsers, 346
- content with accordions, 422–424
- data, 652–661
- elements, 399
- messages
- in dialogs, 420–422
- to users, 177–179
- using alert() method, 280–281
- shrinking flex items, 146–149
- sibling selector, 550
- signing in/out, of web apps, 696–704
- signing up
- with commercial hosting providers, 37
- web app users, 682–695
- signInUser() method, 700–703
- sin() method, 339
- single-line syntax, 226
- size effect, 428
- sizes
- styling, 105–106
- type, 87–88
- slice() method, 305–306, 316, 318
- slide effect, 428
- slideDown() method, 401, 402
- slideToggle() method, 401, 402, 405, 406, 410
- slideUp() method, 401, 402
- sliding elements, 401
- small caps control, 749
- sort() function, 306–308, 448–449
- sortable interaction, 431
- sorting arrays, 448–449
- space-around alignment, 140
- space-between alignment, 140
- <span> tag, 77–78, 104, 106
- special characters, inserting, 68–69
- specificity, CSS and, 101
- specifying
- any date/time, 325
- colors, 93–94
- current date/time, 324–325
- elements, 284–287
- grid rows/columns, 154–155
- Spectrum color picker, 741, 752
- splice() method, 308–310, 322–323
- split() method, 316, 318–320
- SQL (Structured Query Language), 470, 480–481
- SQL injection, 609–611
- SQLSELECT statement, 503
- sqrt() method, 339
- srcset attribute, 733
- ss argument, 324
- start tag, 50
- starting
- User class, 678–679
- web app Data class, 639–640
- startup files, creating for web apps, 630–635
- statements
- block, 227
- break statement, exiting loops using, 243–245
- compound, 227
- continue statement, 245–246
- debugger statement, 247, 350
- defined, 178, 250
- document.write() statement, 180
- echo statement, 437, 440, 465–466
- for() statement, 236, 300
- if() statements
- about, 392
- decision-making with, 452–453
- making true/false statements with, 226–227
- nesting, 230–231
- if()…else statements, 228–229
- long, 206
- prepared, 614–616
- require statement, 505
- return statement, 259, 458
- SQLSELECT statement, 503
- switch() statement, 231–234, 329, 453–454, 522, 647, 660, 682, 763
- using variables in, 186–187
- var_dump() statements, 466
- static, 120
- static web pages, 15, 389
- stepping through code, 350–352
- storage space, as a web hosting consideration, 37–38
- storing
- data on servers, 16
- query results in arrays, 500–501
- user data in browsers, 734–737
- values in variables, 185
- strategies, for debugging, 355–356
- stretch alignment, 141
- strict equality operator, 212
- strict inequality operator, 212
- string expressions, building, 205–207
- string literals, 191–193
- String object
- about, 269
- determining length of, 312–313
- manipulating text with, 311–323
- methods, 313, 316
- stringify, 736
- strings
- comma-delimited, 319
- converting numbers and, 336–338
- creating, 302–303
- outputting long, 443–445
- outputting variables in, 442–443
- using in comparison expressions, 213
- using quotation marks within, 191–192
- zero-based, 314
- strlen() function, 578
- <strong> tag, 59, 60
- str_replace() function, 614
- structure
- adding, 13–14
- expressions, 197–198
- of functions, 250–251
- style vs., 57–58
- of web pages, 71–78
- web pages with HTML, 49–78
- Structured Query Language (SQL), 470, 480–481
- style attribute, 83
- style rule, 82
- style sheet, 80–81
- <style> tag, 95, 764
- styles
- adding
- about, 14–15, 83–87
- to web pages, 83–87
- as a border value, 109
- Cascading Style Sheets (CSS), 80
- elements, 288–289
- structure vs., 57–58
- styling
- invalid fields, 571–574
- links, 91–92
- page text, 87–93
- sizes, 105–106
- text, 91
- web pages with CSS, 79–101
- subdomain name, 38
- Sublime Text (website), 34
- submenu, 419
- submitting
- form data, 563–564
- web forms, 561–564
- submitting forms, 537–538
- subobjects, 270
- subsets, returning of arrays, 305–306
- substr() method, 316, 320–321, 322–323
- substring() method, 316, 321–322, 322–323
- substrings
- extracting with methods, 315–323
- finding, 313–315
- subtraction (-) operator, 199, 201–202, 220, 438
- switch() statement, 231–234, 329, 453–454, 522, 647, 660, 682, 763
- syntax
- defined, 33
- errors in, 342
- highlighting in text editors, 33
- for JSON, 526–527
- Syntax error error message, 359
- system font, 90
T
- tables
- adding data to with INSERT query, 490–491
- creating in MySQL databases, 624–625
- modifying data with UPDATE query, 491
- MySQL databases, 468–469
- querying multiple, 485–490
- relating, 476–477
- removing data from with DELETE query, 492
- tabs, dividing content into, 415–418
- tag selector (jQuery), 370
- tags
- <a> tag, 62–63, 64, 106, 129
- adding to elements, 288
- applying basic text, 58–62
- <article> tag, 74, 104, 106, 764
- <aside> tag, 75, 114, 634
- attributes for, 52–53
- <b> tag, 60
- <blockquote> tag, 62, 104
- <body> tag, 54, 56, 95–96, 151, 162, 743
- <button> tag, 256, 537
- case sensitivity for, 54
- defined, 13, 50
- <div> tag, 76–77, 104, 105, 106, 394
- <em> tag, 51, 60
- end, 50
- <footer> tag, 75–76, 96, 114, 116–117
- <form> tag, 536
- format of, 50
- <h1…h4> tags, 61, 104
- <head> tag, 54, 95
- <header> tag, 71–72, 96, 104, 105, 114, 376
- <hr> tag, 52
- <html> tag, 95
- <i> tag, 59
- <img> tag, 70, 116–117, 124
- <input> tag, 394, 537, 543–548, 548–551, 550, 567–568, 763
- <li> tag, 65
- <link> tag, 86–87
- <main> tag, 73, 96
- <meta> tag, 68
- <nav> tag, 72–73, 96, 114
- nesting, 60
- <noscript> tag, 176
- <ol> tag, 67
- <option> tag, 551–555
- outputting, 439–445
- <p> tag, 76, 104, 106, 405
- <pre> tag, 448
- <script> tag, 175–176, 176–177, 250, 252–253
- <section> tag, 74–75, 104, 114, 405, 660
- <select> tag, 551–555, 763
- <span> tag, 77–78, 104, 106
- specifying elements by name, 285–286
- start, 50
- <strong> tag, 59, 60
- <style> tag, 95, 764
- <title> tag, 55, 60, 95
- <ul> tag, 65
- tan() method, 339
- target property, 393
- tech support, as a web hosting consideration, 39
- Technical Stuff icon,
- techniques, layout, 128
- tel type, 539
- terminator, 444
- ternary (?:) operator, 214, 221
- testing width, 726
- text
- adding
- about, 56–57
- controls, 747–750
- to elements, 288
- bolding, 91
- coloring, 94
- emphasizing, 58–59
- fields, 538–543
- italicizing, 91
- manipulating with String object, 311–323
- marking, 59–60
- for mobile-first web development, 725
- outputting, 439–445
- processing in text editors, 34
- styling, 91, 745
- validating data, 578–580
- writing to pages, 179–180
- text editors, 33–34
- text() method, 376, 554
- text type, 539
- text-align property, 88, 92
- <textarea>, 540
- text-declaration property, 88
- text-indent property, 88, 92–93
- TextMate (website), 34
- ThemeRoller page (website), 415
- tilde (~) symbol, 550
- time() function, 629
- time type, 539
- timeouts (JavaScript), 276–280
- times
- about, 322–335
- specifying any, 325
- specifying current, 324–325
- Tip icon,
- <title> tag, 55, 60, 95
- titles
- adding to web pages, 54–56
- tips for, 55–56
- toggle() method, 399, 402, 425
- toggleClass() method, 384–385, 385–386
- toggling classes, 384–385
- token, 628
- tools, for debugging, 344–345
- top property, 121
- Transmit (website), 44
- triggering
- submit events, 562
- web form events, 557–561
- true block, 107
- true/false statements, making with if() statements, 226–227
- truth table, 216, 217
- turning off event handlers, 398
- two-dimensional arrays, 299
- type, setting size of, 87–88
- type selector, 97
- typeface, 90
U
- ui-accordion class, 424
- ui-accordion-content class, 424
- ui-accordion-header class, 424
- ui-dialog class, 422
- ui-dialog-container class, 422
- ui-dialog-title class, 422
- ui-dialog-titlebar class, 422
- ui-menu class, 420
- ui-menu-item class, 420
- ui-menu-wrapper class, 420
- <ul> tag, 65
- unauthorized access, 612
- Unexpected end of input error message, 360
- Unexpected identifier error message, 360
- uniform resource locator (URL),
- Unix, 39
- unordered list, 65
- unshift() method, 310
- Unterminated string constant error message, 361
- Unterminated string literal error message, 361
- UPDATE query, 481, 491
- updateData() method, 667
- updating
- data, 661–668
- elements with server data using .load() method, 514–522
- queries, 504–505
- values of watch expressions, 355
- uploading
- defined, 43
- website files, 44–45
- uptime, as a web hosting consideration, 39
- URL (uniform resource locator),
- url type, 539
- User class, 678–679
- user data, 596, 734–737
- user experience (UX), 599
- user functions, of web apps, 595
- user handling script, 679–682
- user interactions, 280–284
- user style sheet, 100
- user-generated data, 596
- users (web app)
- about, 673
- adding to databases, 689–690
- checking credentials for, 700–703
- configuring home page, 674–677
- deleting, 714–719
- displaying messages to, 177–179
- resetting passwords, 704–713
- setting up back end, 677–682
- signing in/out, 696–704
- signing up new, 682–695
- verifying, 690–695
- UX (user experience), 599
V
- val() method, 542–543, 546–547
- validating
- email fields, 569
- fields based on data type, 580–581
- form data in browsers, 566–574
- form data on servers, 574–582
- against patterns, 582
- text data, 578–580
- values
- arrays, 447–448, 450
- attribute, 385–386
- changing of properties, 273
- defined, 407
- incrementing the, 200–201
- passing to functions, 255–258, 457
- returning
- from functions, 258–259
- values from, 458
- storing in variables, 185
- text field, 542–543
- var() function, 613
- var_dump() statements, 466
- variables
- about, 183–184
- declaring, 184–185
- JSON, 527–528
- literal data types, 189–193
- local vs. global, 259–262, 359
- naming, 187–189
- outputting in strings, 442–443
- PHP, 438
- rules for naming, 187–188
- storing values in, 185
- using in statements, 186–187
- viewing
- all variable values, 353–354
- single variable values, 352–353
- vendor prefixes, 152
- verification emails, sending, 688–689
- verifying
- data types, 613–614
- for required fields, 575–578
- for signed-in users, 696–697
- user credentials, 700–703
- users, 690–695
- verifyUser() method, 691–695, 708
- vertical space, 113
- vh (viewport height), 89
- viewing
- all variable values, 353–354
- files on servers, 28, 32
- folders on servers, 28, 32
- single variable values, 352–353
- viewport, 275, 601
- viewport height (vh), 89
- viewport width (vw), 89
- virtual server, 39
- visual impairments, 606
- vw (viewport width), 89
W
- w symbol, 583
- W symbol, 583
- Warning icon,
- watch expressions, 354–355
- web address, 42
- web apps. See also mobile web apps
- about, 19, 593–594, 619
- accessibility of, 605–608
- adding jQuery Mobile to, 730–731
- appearance of pages, 598–599
- Atom editor, 34
- back-end code, 626–630
- building home pages for, 635
- Coda, 34
- creating
- back-end initialization files, 631–632
- data, 643–652
- databases, 624–625
- front-end common files, 633–634
- startup files for, 630–635
- tables, 624–625
- data requirements for, 596–597
- defending, 612–618
- deleting data, 668–672
- displaying data, 652–661
- editing data, 661–668
- functionality of, 595–596
- mobile, 19–20
- Notepad++, 34
- page requirements for, 597–598
- planning, 595–599
- reading data, 652–661
- responsiveness of, 599–605
- role of
- MySQL in, 494–495
- PHP in, 494–495
- security for, 608–618
- setting up directory structure, 620–624
- starting Data class, 639–640
- Sublime Text, 34
- TextMate, 34
- updating data, 661–668
- web coding and development. See also specific topics
- about, –8
- basics of, –12
- home, 21–34, 41–45
- how it works, –12
- web coding vs. web development, 20
- Web Coding Playground (website), , 93
- web development. See web coding and development
- web files, changing, 45
- web forms
- about, 533–534, 565
- adding
- about, 697–700
- buttons, 537–538
- selection lists, 551–555
- building, 643–647, 683–685
- checking for required fields, 575–578
- conforming field values, 570–571
- handling events, 557–561
- how they work, 535
- HTML5, 536–537
- making fields mandatory, 566–567
- preventing default form submission, 562
- programming pickers, 555–557
- radio buttons, 548–551
- regular expressions, 582–589
- restricting text field length, 567–568
- setting maximum/minimum values on numeric fields, 568–569
- styling invalid fields, 571–574
- submitting
- about, 561–564
- data, 563–564
- text fields, 538–543
- triggering events, 557–561
- validating
- data in browsers, 566–574
- data on servers, 574–582
- email fields, 569
- fields based on data types, 580–581
- against patterns, 582
- text data, 578–580
- Web Hosting Talk (website), 40
- web hosts
- defined, 36
- finding, 35–45, 40–41
- providers, 36–40
- setting up, 35–45
- web pages
- adding
- elements to, 287–290
- styles to, 83–87
- titles to, 54–56
- appearance of in web apps, 598–599
- building
- accordions, 403–406
- with animation, 398–410
- reactive pages with events, 388–398
- calling functions after loading, 253–254
- family, 95–96
- including jQuery in, 366–368
- loading fragments, 518–519
- manipulating, 268
- moving data to, 469
- requirements for web apps, 597–598
- structure of, 71–78
- structure of HTML5, 53–57
- structuring with HTML, 49–78
- styling
- with CSS, 79–101
- text, 87–93
- writing text to, 179–180
- web root, 620
- web servers
- accessing data on, 16
- adding files/folders to, 28, 32
- communicating
- with .get() method, 523–526
- with .post() method, 523–526
- defined, 36
- handling JSON data returned by, 530–532
- sending
- data to, 519–520, 685–688
- form data to, 648–649
- storing data on, 16
- validating web form data on, 574–582
- viewing files/folders on, 28, 32
- web storage, 735, 736–737
- website statistics, as a web hosting consideration, 40
- websites
- Alphabet, 594
- Apache Friends, 24
- Brackets, 34
- CNET Web Hosting Solutions, 41
- Coda, 44
- CuteFTP, 44
- Cyberduck, 44
- examples in this book,
- FileZilla, 44
- Gmail, 594
- GoDaddy, 38
- Google, 594
- Google Maps, 594
- jQuery Mobile icons, 744
- JSONLint, 528
- PC Magazine Web Site Hosting Services Reviews, 41
- phpMyAdmin, 470, 624
- Register, 38
- Review Hell, 41
- Review Signal Web Hosting Reviews, 41
- ThemeRoller page, 415
- Transmit, 44
- uploading files for, 44–45
- Web Coding Playground, , 93
- Web Hosting Talk, 40
- XAMPP Dashboard, 470
- YouTube, 594
- week picker, 557
- weight, CSS and, 100–101
- WHERE clause, 503
- which property, 393
- while() loops, 235–237, 454–455
- white space, 56
- whitelisting, 614
- widgets
- defined, 415
- as a jQuery UI category, 412
- for mobile-first web development, 726
- working with, 415–424
- width, 105–106, 109
- width attribute, 52
- width() method, 381–382
- width property, 14
- wildcard characters, 483
- window object, 270, 735
- window objects
- about, 275
- properties, 275–276
- referencing, 275
- window property, 272
- Windows
- configuring php.ini for debugging, 463
- displaying Console on, 346
- inserting special characters, 68
- opening web development tools in, 344
- setting up public subdirectory, 621
- Windows Control Panel, running XAMPP for, 26–27
- Windows Development Environment, setting up XAMPP for, 23–29
- Windows Server, 39
- words
- handling, 77–78
- in programming languages, 171
- workflow, 597
- writing
- custom CSS code, 763–764
- text to pages, 179–180
X
- X has no properties error message, 361
- X is not an object error message, 361
- X is not defined error message, 360
- XAMPP
- installing, 24–26
- installing for OS X, 29–30
- running for Windows Control Panel, 26–27
- setting up for OS X development environment, 29–33
- setting up for Windows Development Environment, 23–29
- XAMPP Application Manager, running, 30–31
- XAMPP Dashboard (website), 470
- XML, 511
- XMLHttpRequest object, 512
- XSS (cross-site scripting), 611–612
Y
- yes/no decision, 226
- YouTube (website), 594
- yy argument, 324
- yyyy argument, 324
Z
- zero-based strings, 314
..................Content has been hidden....................
You can't read the all page of ebook, please click
here login for view all page.