JavaScript Phrasebook: Essential Code and Commands

Overview

Developers are hungry for a concise, easy-to-use reference that puts essential code "phrases" at their fingertips. JavaScript, and the related AJAX, is hot and there is little to no information on how to use JavaScript to develop AJAX-based applications. While there are many JavaScript books on the market, most of them are dated and few cover the most recent developments, such as AJAX.

JavaScript Phrasebook is the guide to JavaScript and AJAX that you can and will take with you ...

See more details below
Paperback
$18.54
BN.com price
(Save 25%)$24.99 List Price

Pick Up In Store

Reserve and pick up in 60 minutes at your local store

Other sellers (Paperback)
  • All (27) from $1.99   
  • New (7) from $1.99   
  • Used (20) from $1.99   
Sending request ...

Overview

Developers are hungry for a concise, easy-to-use reference that puts essential code "phrases" at their fingertips. JavaScript, and the related AJAX, is hot and there is little to no information on how to use JavaScript to develop AJAX-based applications. While there are many JavaScript books on the market, most of them are dated and few cover the most recent developments, such as AJAX.

JavaScript Phrasebook is the guide to JavaScript and AJAX that you can and will take with you everywhere. Skipping the usual tutorial on JavaScript and introducing AJAX as one of the first published works on the topic, the JavaScript Phrasebook goes straight to practical JavaScript and AJAX tools, providing immediately applicable solutions for frequent tasks and code so flexible that it is easily adapted to the your individual needs.

Read More Show Less

Product Details

  • ISBN-13: 9780672328800
  • Publisher: Sams
  • Publication date: 9/11/2006
  • Series: Developer's Library
  • Pages: 262
  • Sales rank: 1,454,762
  • Product dimensions: 4.48 (w) x 6.92 (h) x 0.47 (d)

Meet the Author

Christian Wenz is a professional phrasemonger, author, trainer, and consultant with a focus on web technologies. He frequently contributes articles to renowned IT magazines and speaks at conferences around the globe. Christian contributes to several PHP packages in the PEAR repository and also maintains one Perl CPAN module. He holds a degree (“Diplom”) in Computer Sciences from Technical University of Munich and lives and works in Munich, Germany. He also is Europe’s very first Zend Certified Professional and founding principal at the PHP Security Consortium. He has written or cowritten more than four dozen books, including PHP 5 Unleashed and PHP Phrasebook.

Read More Show Less

Read an Excerpt

IntroductionIntroduction

Back in 1999, I wrote a book on JavaScript. At the beginning, it sold really great, and then sales started to decrease a little bit. It still sold well enough to reach seven editions by this fall, but there was a subtle decline in copies nevertheless.

However, all of this changed drastically at the end of last year—sales went up considerably, as did sales of other titles in the same segment. But how come? One of the reasons is AJAX. The technology itself is not new, but the term is. In February 2005, Jesse James Garrett coined the acronym, and since then, the whole web world seems to have gone crazy. And although AJAX can be explained in a couple of minutes actually, it requires a good knowledge of various aspects of JavaScript. This explains the growing demand for advanced JavaScript content, and also led to the writing of the JavaScript Phrasebook.

When we (Damon Jordan, Mark Taber, and I) created the book series in 2005, we wanted to create a kind of pimped-up version of language phrasebooks: Common sentences and expressions are translated into a foreign language—into JavaScript, of course. However, unlike in a regular phrasebook, you will also get explanations alongside the code. Without it, the potential for embarrassing situations is quite high, in any language.

This book is no introduction to JavaScript. Elementary JavaScript features are covered, but we tried to put a great emphasis on intermediary and advanced material as well. The idea behind this phrasebook is that especially if your JavaScript knowledge is rusty, you will find common problems and solutions in this book. So use this book as a reference guide to quickly overcome issues you are facing during development. And explore the book to find some JavaScript features you may not have thought about before.

This book is no cookbook with long and inflexible solutions to short problems. The idea was to keep the code snippets as concise as possible so that the approach can be demonstrated; this enables you to adapt the presented technique to your own applications and your specific scenario. In order to make this possible, only the code elements that are vital for the samples to run are shown in this book. Usually, the code consists only of elements and some other HTML tags to tie everything together. A modern web application should at least try to be XHTML-compliant, but this is not the focus of the elements of this book.

We took great care to make the code work on as many browsers as possible. And while Internet Explorer and the various Mozilla flavors (including Firefox) dominate the market, Opera, Safari, and Konqueror also have their share in it. So while the focus of the phrases lies on the first two browser types, incompatibilities or caveats regarding the smaller browsers are noted where appropriate. Speaking of market shares: Only browsers that are still relevant as of today are covered; therefore, Netscape 4 and Internet Explorer 4 are not mentioned at all.

Code samples to this title and updates can be found at http://javascript.phrasebook.org/. Most listings have the associated filename with them, so you can easily find the right file(s) for each phrase. If you have any feedback or have found an error, please let me know! If a phrase you were hoping to find is missing, please let me know. If you think that it should appear in upcoming editions of the book, I'd also appreciate if you'd nominate another phrase that you feel is superfluous. (These books are small, and there's only so much space.) The list of potential phrases was much longer than what you are holding in your hands now, so we went through a painful process of eliminating content—and hope that the selection is to your liking.

Finally, thank you to a bunch of people who helped make this phrasebook more useful than the famous dictionary in the Monty Python sketch that mapped innocent expressions to vulgar translations: Shelley Johnston set this project up and convinced me to do the original phrasebook (PHP Phrasebook). Damon Jordan also worked on the PHP Phrasebook and served as the editor for this title. Phil Ballard tech-edited this book. Thanks for all your hard work on this!

Also, thanks to Judith Stevens-Lemoine, who has been editing "my other" JavaScript book since 1999. I'd like to thank her for giving me permission to write this phrasebook. Looking forward to the eighth edition!

Your personal phrasemonger,
Christian Wenz

© Copyright Pearson Education. All rights reserved.

Read More Show Less

Table of Contents

Introduction 1

Chapter 1 JavaScript Basics 5

Chapter 2 Common Phrases 19

Chapter 3 Images and Animations 35

Chapter 4 CSS 47

Chapter 5 DOM and DHTML 63

Chapter 6 OOP and Events 93

Chapter 7 Cookies 109

Chapter 8 Forms 123

Chapter 9 Windows and Frames 163

Chapter 10 Web Services 189

Chapter 11 AJAX (and Related Topics) 203

Chapter 12 Embedded Media 237

Read More Show Less

Preface

Introduction

Back in 1999, I wrote a book on JavaScript. At the beginning, it sold really great, and then sales started to decrease a little bit. It still sold well enough to reach seven editions by this fall, but there was a subtle decline in copies nevertheless.

However, all of this changed drastically at the end of last year—sales went up considerably, as did sales of other titles in the same segment. But how come? One of the reasons is AJAX. The technology itself is not new, but the term is. In February 2005, Jesse James Garrett coined the acronym, and since then, the whole web world seems to have gone crazy. And although AJAX can be explained in a couple of minutes actually, it requires a good knowledge of various aspects of JavaScript. This explains the growing demand for advanced JavaScript content, and also led to the writing of the JavaScript Phrasebook.

When we (Damon Jordan, Mark Taber, and I) created the book series in 2005, we wanted to create a kind of pimped-up version of language phrasebooks: Common sentences and expressions are translated into a foreign language—into JavaScript, of course. However, unlike in a regular phrasebook, you will also get explanations alongside the code. Without it, the potential for embarrassing situations is quite high, in any language.

This book is no introduction to JavaScript. Elementary JavaScript features are covered, but we tried to put a great emphasis on intermediary and advanced material as well. The idea behind this phrasebook is that especially if your JavaScript knowledge is rusty, you will find common problems and solutions in this book. So use this book as a reference guide to quickly overcome issues you are facing during development. And explore the book to find some JavaScript features you may not have thought about before.

This book is no cookbook with long and inflexible solutions to short problems. The idea was to keep the code snippets as concise as possible so that the approach can be demonstrated; this enables you to adapt the presented technique to your own applications and your specific scenario. In order to make this possible, only the code elements that are vital for the samples to run are shown in this book. Usually, the code consists only of <script> elements and some other HTML tags to tie everything together. A modern web application should at least try to be XHTML-compliant, but this is not the focus of the elements of this book.

We took great care to make the code work on as many browsers as possible. And while Internet Explorer and the various Mozilla flavors (including Firefox) dominate the market, Opera, Safari, and Konqueror also have their share in it. So while the focus of the phrases lies on the first two browser types, incompatibilities or caveats regarding the smaller browsers are noted where appropriate. Speaking of market shares: Only browsers that are still relevant as of today are covered; therefore, Netscape 4 and Internet Explorer 4 are not mentioned at all.

Code samples to this title and updates can be found at http://javascript.phrasebook.org/. Most listings have the associated filename with them, so you can easily find the right file(s) for each phrase. If you have any feedback or have found an error, please let me know! If a phrase you were hoping to find is missing, please let me know. If you think that it should appear in upcoming editions of the book, I'd also appreciate if you'd nominate another phrase that you feel is superfluous. (These books are small, and there's only so much space.) The list of potential phrases was much longer than what you are holding in your hands now, so we went through a painful process of eliminating content—and hope that the selection is to your liking.

Finally, thank you to a bunch of people who helped make this phrasebook more useful than the famous dictionary in the Monty Python sketch that mapped innocent expressions to vulgar translations: Shelley Johnston set this project up and convinced me to do the original phrasebook (PHP Phrasebook). Damon Jordan also worked on the PHP Phrasebook and served as the editor for this title. Phil Ballard tech-edited this book. Thanks for all your hard work on this!

Also, thanks to Judith Stevens-Lemoine, who has been editing "my other" JavaScript book since 1999. I'd like to thank her for giving me permission to write this phrasebook. Looking forward to the eighth edition!

Your personal phrasemonger,
Christian Wenz

© Copyright Pearson Education. All rights reserved.

Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star

(0)

4 Star

(0)

3 Star

(0)

2 Star

(0)

1 Star

(0)

Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation

Reminder:

  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

 
Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously
Sort by: Showing 1 Customer Reviews
  • Posted December 5, 2009

    Concise text with accurate code

    For those familiar enough with javascript to know when to use it correctly, it has most of the needed code snippets fully explained and commented. A quick way to get the job done.

    Was this review helpful? Yes  No   Report this review
Sort by: Showing 1 Customer Reviews

If you find inappropriate content, please report it to Barnes & Noble
Why is this product inappropriate?
Comments (optional)