Acknowledgments |
|
xiv | |
Introduction |
|
xv | |
|
|
|
|
3 | (8) |
|
Downloading and Installing Web Browsers |
|
|
3 | (1) |
|
Choosing a Program Editor |
|
|
4 | (2) |
|
|
6 | (1) |
|
Older Versions of Microsoft Internet Explorer |
|
|
7 | (2) |
|
|
9 | (2) |
|
|
11 | (10) |
|
Inserting the PHP Recipes |
|
|
11 | (1) |
|
Inserting the JavaScript Recipes |
|
|
12 | (1) |
|
Inserting the CSS Recipes |
|
|
12 | (1) |
|
A Quick Refresher on the DOM |
|
|
13 | (5) |
|
|
18 | (3) |
|
|
|
|
21 | (28) |
|
|
21 | (4) |
|
|
25 | (3) |
|
|
28 | (4) |
|
Recipe 4 StripWhitespace() |
|
|
32 | (2) |
|
|
34 | (2) |
|
|
36 | (3) |
|
|
39 | (1) |
|
|
40 | (5) |
|
|
45 | (2) |
|
|
47 | (2) |
|
|
49 | (30) |
|
|
49 | (4) |
|
|
53 | (2) |
|
Recipe 13 MakeThumbnail() |
|
|
55 | (3) |
|
|
58 | (3) |
|
|
61 | (2) |
|
|
63 | (3) |
|
|
66 | (3) |
|
|
69 | (2) |
|
|
71 | (3) |
|
Recipe 20 ImageWatermark() |
|
|
74 | (5) |
|
|
79 | (28) |
|
|
79 | (3) |
|
Recipe 22 GetLinksFromURL() |
|
|
82 | (2) |
|
|
84 | (3) |
|
Recipe 24 DirectoryList() |
|
|
87 | (4) |
|
Recipe 25 QueryHighlight() |
|
|
91 | (3) |
|
Recipe 26 RollingCopyright() |
|
|
94 | (1) |
|
Recipe 27 EmbedYouTubeVideo() |
|
|
95 | (2) |
|
|
97 | (2) |
|
|
99 | (4) |
|
|
103 | (4) |
|
|
107 | (34) |
|
Recipe 31 EvaluateExpression() |
|
|
107 | (3) |
|
|
110 | (4) |
|
Recipe 33 CreateCaptcha() |
|
|
114 | (5) |
|
|
119 | (2) |
|
|
121 | (5) |
|
Recipe 36 ValidateEmail() |
|
|
126 | (2) |
|
|
128 | (2) |
|
|
130 | (3) |
|
|
133 | (3) |
|
|
136 | (5) |
|
|
141 | (42) |
|
|
141 | (3) |
|
Recipe 42 GetTitleFromURL() |
|
|
144 | (1) |
|
Recipe 43 AutoBackLinks() |
|
|
145 | (3) |
|
Recipe 44 CreateShortURL() |
|
|
148 | (3) |
|
|
151 | (4) |
|
Recipe 46 SimpleWebProxy() |
|
|
155 | (7) |
|
|
162 | (5) |
|
|
167 | (6) |
|
|
173 | (3) |
|
|
176 | (7) |
|
|
183 | (38) |
|
|
183 | (3) |
|
Recipe 52 PostToGuestBook() |
|
|
186 | (3) |
|
|
189 | (3) |
|
|
192 | (6) |
|
|
198 | (6) |
|
|
204 | (3) |
|
Recipe 57 SendDirectTweet() |
|
|
207 | (2) |
|
|
209 | (3) |
|
Recipe 59 ReplaceSmileys() |
|
|
212 | (4) |
|
Recipe 60 ReplaceSMSTalk() |
|
|
216 | (5) |
|
9 MySQL, Sessions, and Cookies |
|
|
221 | (30) |
|
|
221 | (7) |
|
Recipe 62 GetUserFromDB() |
|
|
228 | (2) |
|
Recipe 63 VerifyUserInDB() |
|
|
230 | (2) |
|
Recipe 64 SanitizeString() and MySQLSanitizeString() |
|
|
232 | (3) |
|
Recipe 65 CreateSession() |
|
|
235 | (2) |
|
|
237 | (2) |
|
|
239 | (2) |
|
Recipe 68 SecureSession() |
|
|
241 | (2) |
|
|
243 | (3) |
|
Recipe 70 BlockUserByCookie() |
|
|
246 | (5) |
|
|
251 | (50) |
|
Recipe 71 CreateGoogleChart() |
|
|
251 | (6) |
|
Recipe 72 CurlGetContents() |
|
|
257 | (3) |
|
Recipe 73 FetchWikiPage() |
|
|
260 | (7) |
|
Recipe 74 FetchFlickrStream() |
|
|
267 | (4) |
|
Recipe 75 GetYahooAnswers() |
|
|
271 | (4) |
|
|
275 | (5) |
|
Recipe 77 GetYahooStockNews() |
|
|
280 | (6) |
|
|
286 | (4) |
|
Recipe 79 SearchGoogleBooks() |
|
|
290 | (5) |
|
Recipe 80 ConvertCurrency() |
|
|
295 | (6) |
|
11 Incorporating JavaScript |
|
|
301 | (34) |
|
Recipe 81 CreateAjaxObject() |
|
|
301 | (4) |
|
Recipe 82 GetAjaxRequest() |
|
|
305 | (3) |
|
Recipe 83 PostAjaxRequest() |
|
|
308 | (2) |
|
|
310 | (3) |
|
|
313 | (3) |
|
Recipe 86 StatusMessage() |
|
|
316 | (3) |
|
|
319 | (6) |
|
|
325 | (3) |
|
Recipe 89 WordsFromRoot() |
|
|
328 | (3) |
|
|
331 | (4) |
|
|
335 | (34) |
|
Recipe 91 GetCountryFromIP() |
|
|
335 | (3) |
|
Recipe 92 BypassCaptcha() |
|
|
338 | (2) |
|
Recipe 93 GetBookFromISBN() |
|
|
340 | (2) |
|
Recipe 94 GetAmazonSalesRank() |
|
|
342 | (4) |
|
Recipe 95 PatternMatchWord() |
|
|
346 | (2) |
|
Recipe 96 SuggestSpelling() |
|
|
348 | (5) |
|
Recipe 97 AnagramFinder() |
|
|
353 | (3) |
|
|
356 | (4) |
|
|
360 | (3) |
|
Recipe 100 DisplayBingMap() |
|
|
363 | (6) |
|
PART III JavaScript Recipes |
|
|
|
|
369 | (48) |
|
|
369 | (1) |
|
|
370 | (7) |
|
|
377 | (3) |
|
|
380 | (6) |
|
|
386 | (2) |
|
Recipe 5 CaptureKeyboard() |
|
|
388 | (3) |
|
|
391 | (2) |
|
|
393 | (2) |
|
|
395 | (3) |
|
|
398 | (2) |
|
|
400 | (2) |
|
|
402 | (3) |
|
|
405 | (1) |
|
|
406 | (2) |
|
|
408 | (2) |
|
|
410 | (2) |
|
|
412 | (1) |
|
|
413 | (1) |
|
|
414 | (3) |
|
14 Location and Dimensions |
|
|
417 | (22) |
|
|
417 | (2) |
|
|
419 | (1) |
|
|
420 | (2) |
|
|
422 | (2) |
|
|
424 | (1) |
|
|
425 | (2) |
|
Recipe 25 GetWindowWidth() |
|
|
427 | (1) |
|
Recipe 26 GetWindowHeight() |
|
|
428 | (2) |
|
|
430 | (3) |
|
|
433 | (2) |
|
|
435 | (2) |
|
|
437 | (2) |
|
|
439 | (30) |
|
|
439 | (2) |
|
|
441 | (1) |
|
Recipe 33 VisibilityToggle() |
|
|
442 | (2) |
|
|
444 | (3) |
|
|
447 | (8) |
|
|
455 | (1) |
|
|
456 | (2) |
|
|
458 | (2) |
|
|
460 | (2) |
|
|
462 | (2) |
|
|
464 | (2) |
|
|
466 | (3) |
|
16 Movement and Animation |
|
|
469 | (46) |
|
|
469 | (7) |
|
|
476 | (4) |
|
|
480 | (6) |
|
|
486 | (4) |
|
Recipe 47 DeflateToggle() |
|
|
490 | (2) |
|
Recipe 48 DeflateBetween() |
|
|
492 | (3) |
|
|
495 | (10) |
|
|
505 | (3) |
|
|
508 | (3) |
|
|
511 | (4) |
|
17 Chaining and Interaction |
|
|
515 | (34) |
|
Recipe 53 Chain(), NextInChain(), and CallBack() |
|
|
515 | (7) |
|
|
522 | (2) |
|
|
524 | (5) |
|
|
529 | (2) |
|
|
531 | (3) |
|
|
534 | (5) |
|
|
539 | (10) |
|
|
549 | (46) |
|
Recipe 60 HoverSlideMenu() |
|
|
549 | (5) |
|
|
554 | (3) |
|
|
557 | (3) |
|
|
560 | (3) |
|
|
563 | (6) |
|
|
569 | (5) |
|
|
574 | (5) |
|
|
579 | (4) |
|
|
583 | (3) |
|
Recipe 69 BrowserWindow() |
|
|
586 | (9) |
|
|
595 | (32) |
|
|
595 | (4) |
|
|
599 | (4) |
|
|
603 | (4) |
|
|
607 | (3) |
|
|
610 | (6) |
|
|
616 | (4) |
|
|
620 | (7) |
|
20 Audio and Visual Effects |
|
|
627 | (34) |
|
|
627 | (5) |
|
|
632 | (6) |
|
|
638 | (6) |
|
|
644 | (5) |
|
|
649 | (3) |
|
|
652 | (3) |
|
Recipe 83 PulsateOnMouseover() |
|
|
655 | (6) |
|
21 Cookies, Ajax, and Security |
|
|
661 | (18) |
|
Recipe 84 ProcessCookie() |
|
|
661 | (5) |
|
Recipe 85 CreateAjaxObject() |
|
|
666 | (3) |
|
Recipe 86 GetAjaxRequest() |
|
|
669 | (3) |
|
Recipe 87 PostAjaxRequest() |
|
|
672 | (3) |
|
|
675 | (2) |
|
|
677 | (2) |
|
|
679 | (20) |
|
|
679 | (4) |
|
Recipe 91 ResizeTextarea() |
|
|
683 | (3) |
|
Recipe 92 ValidateEmail() |
|
|
686 | (3) |
|
Recipe 93 ValidatePassword() |
|
|
689 | (2) |
|
Recipe 94 CleanupString() |
|
|
691 | (2) |
|
Recipe 95 ValidateCreditCard() |
|
|
693 | (6) |
|
23 Solutions to Common Problems |
|
|
699 | (28) |
|
Recipe 96 RollingCopyright() |
|
|
699 | (2) |
|
|
701 | (6) |
|
|
707 | (1) |
|
|
708 | (5) |
|
|
713 | (5) |
|
|
718 | (9) |
|
|
|
|
727 | (58) |
|
|
727 | (3) |
|
|
730 | (2) |
|
Recipe 3 Background Colors |
|
|
732 | (4) |
|
|
736 | (6) |
|
Recipe 5 Inverse Gradients |
|
|
742 | (5) |
|
|
747 | (3) |
|
|
750 | (2) |
|
|
752 | (3) |
|
|
755 | (3) |
|
Recipe 10 Visibility and Display |
|
|
758 | (3) |
|
|
761 | (3) |
|
|
764 | (2) |
|
|
766 | (3) |
|
Recipe 14 Selective Margins |
|
|
769 | (3) |
|
Recipe 15 Selective Padding |
|
|
772 | (3) |
|
|
775 | (2) |
|
|
777 | (2) |
|
|
779 | (2) |
|
|
781 | (4) |
|
|
785 | (34) |
|
|
785 | (4) |
|
|
789 | (2) |
|
|
791 | (3) |
|
Recipe 23 Text Point Size |
|
|
794 | (2) |
|
|
796 | (4) |
|
|
800 | (3) |
|
Recipe 26 Text Transformations |
|
|
803 | (1) |
|
|
804 | (2) |
|
|
806 | (4) |
|
|
810 | (2) |
|
|
812 | (3) |
|
|
815 | (2) |
|
|
817 | (2) |
|
|
819 | (20) |
|
|
819 | (3) |
|
|
822 | (7) |
|
Recipe 35 Horizontal Menu |
|
|
829 | (1) |
|
|
830 | (3) |
|
Recipe 37 Bottom Dock Bar |
|
|
833 | (1) |
|
Recipe 38 Tooltip and Tooltip Fade |
|
|
834 | (5) |
|
|
839 | (18) |
|
|
839 | (3) |
|
|
842 | (4) |
|
|
846 | (2) |
|
|
848 | (2) |
|
|
850 | (2) |
|
|
852 | (1) |
|
|
853 | (4) |
|
|
857 | (32) |
|
|
857 | (2) |
|
Recipe 47 Star Rating Using Images |
|
|
859 | (1) |
|
|
860 | (2) |
|
|
862 | (3) |
|
|
865 | (3) |
|
|
868 | (4) |
|
|
872 | (3) |
|
|
875 | (4) |
|
|
879 | (1) |
|
|
880 | (3) |
|
Recipe 56 Odd and Even Text Colors |
|
|
883 | (3) |
|
Recipe 57 Odd and Even Background Colors |
|
|
886 | (3) |
|
|
889 | (28) |
|
Recipe 58 NoJS (nojs) and OnlyJS (onlyjs) |
|
|
889 | (3) |
|
Recipe 59 Middle (middle) |
|
|
892 | (2) |
|
Recipe 60 Center (center) |
|
|
894 | (1) |
|
|
895 | (1) |
|
Recipe 62 Bottom (bottom) |
|
|
896 | (1) |
|
|
897 | (1) |
|
|
898 | (1) |
|
Recipe 65 On Demand (ondemand) |
|
|
899 | (3) |
|
Recipe 66 Fadein (fadein[ n]) |
|
|
902 | (2) |
|
Recipe 67 Fadeout (fadeout[ n]) |
|
|
904 | (1) |
|
Recipe 68 Resize Textarea (resizeta[ n | n]) |
|
|
905 | (1) |
|
Recipe 69 Rotate (rotate[ n]) |
|
|
906 | (3) |
|
|
909 | (1) |
|
|
910 | (1) |
|
|
911 | (1) |
|
|
912 | (2) |
|
Recipe 74 Text Color (color[ colorname / #nnnnnn / #nnn]) |
|
|
914 | (1) |
|
Recipe 75 Background Color (bcolor[ #nnnnnn]) |
|
|
915 | (2) |
|
30 Dynamic Text and Typography |
|
|
917 | (16) |
|
Recipe 76 Typetext (typetext[ n]) |
|
|
917 | (1) |
|
Recipe 77 Digits Only (digitsonly) |
|
|
918 | (2) |
|
Recipe 78 Text Only (textonly) |
|
|
920 | (1) |
|
Recipe 79 No Spaces (nospaces) |
|
|
921 | (2) |
|
Recipe 80 No Punctuation (nopunct) |
|
|
923 | (1) |
|
Recipe 81 Minimum Whitespace (minwhitespace) |
|
|
924 | (2) |
|
Recipe 82 Google Font (gfont[ n]) |
|
|
926 | (3) |
|
Recipe 83 Text Middle (textmiddle) |
|
|
929 | (1) |
|
Recipe 84 Text Glow (textglow[ #nnnnnn | #nnnnnn | n]) |
|
|
930 | (1) |
|
Recipe 85 Background Glow (backglow[ #nnnnnn | #nnnnnn | n]) |
|
|
931 | (2) |
|
|
933 | (10) |
|
Recipe 86 Placeholder (placeholder[ prompt]) |
|
|
933 | (2) |
|
Recipe 87 Autofocus (autofocus) |
|
|
935 | (1) |
|
Recipe 88 Cite (cite[ citation]) |
|
|
936 | (2) |
|
Recipe 89 Reference (ref[ type | name]) |
|
|
938 | (3) |
|
Recipe 90 No Copy (nocopy) |
|
|
941 | (2) |
|
32 Incorporating JavaScript |
|
|
943 | (8) |
|
Recipe 91 Embed JavaScript (embedjs) |
|
|
943 | (3) |
|
|
946 | (2) |
|
Recipe 93 If Not (ifnot[ expr]) |
|
|
948 | (3) |
|
|
951 | (9) |
|
|
951 | (1) |
|
Recipe 94 Clickable (clickable) |
|
|
952 | (1) |
|
Recipe 95 RSS Button (rssbutton) |
|
|
953 | (1) |
|
Recipe 96 Border (border) |
|
|
954 | (1) |
|
Recipe 97 Absolute Top Left (abstopleft) |
|
|
955 | (1) |
|
Recipe 98 Rollover (rollover) |
|
|
956 | (1) |
|
Recipe 99 Vertical Tab (vtab) |
|
|
957 | (2) |
|
Recipe 100 Horizontal Tab (htab) |
|
|
959 | (1) |
Summary |
|
960 | (1) |
Index |
|
961 | |