JavaScript Goodies

( 7 )


JavaScript Goodies, Second Edition is based on the most popular JavaScript tutorials at It starts with the basics, including JavaScript syntax and common errors readers may encounter. It then continues with detailed lessons covering

  • Enabling mouse events
  • Using variables
  • Working with math operators
  • Writing loops

Later ...

See more details below
Available through our Marketplace sellers.
Other sellers (Paperback)
  • All (15) from $1.99   
  • New (1) from $58.77   
  • Used (14) from $1.99   
Sort by
Page 1 of 1
Showing All
Note: Marketplace items are not eligible for any coupons and promotions
Seller since 2008

Feedback rating:



New — never opened or used in original packaging.

Like New — packaging may have been opened. A "Like New" item is suitable to give as a gift.

Very Good — may have minor signs of wear on packaging but item works perfectly and has no damage.

Good — item is in good condition but packaging may have signs of shelf wear/aging or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Acceptable — item is in working order but may show signs of wear such as scratches or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Used — An item that has been opened and may show signs of wear. All specific defects should be noted in the Comments section associated with each item.

Refurbished — A used item that has been renewed or updated and verified to be in proper working condition. Not necessarily completed by the original manufacturer.


Ships from: Chicago, IL

Usually ships in 1-2 business days

  • Standard, 48 States
  • Standard (AK, HI)
Page 1 of 1
Showing All
Sort by
Sending request ...


JavaScript Goodies, Second Edition is based on the most popular JavaScript tutorials at It starts with the basics, including JavaScript syntax and common errors readers may encounter. It then continues with detailed lessons covering

  • Enabling mouse events
  • Using variables
  • Working with math operators
  • Writing loops

Later chapters explain complex add-ons, including clocks and counters, passwords, and animation. The book finishes with a series of useful appendices readers can refer to for a quick reference of basic JavaScript features and commands.

Read More Show Less

Editorial Reviews

From Barnes & Noble
The Barnes & Noble Review
Maybe you've tried learning JavaScript (or some other scripting language) from a textbook. Not easy, right? But what if you could learn it by tearing apart real scripts that actually do useful things? Now we're talkin'. That's the premise behind JavaScript Goodies, Second Edition.

For years, Joe Burns's web tutorials have taught thousands of new webfolk the ins and outs of JavaScript, HTML, and other core technologies. In this book, he's bundled them all together and added new content that takes you even further. Sixty-five scripts in all, each designed to teach you something new and valuable.

You may start out just tweaking Burns's existing scripts -- and in some cases, that may be all you'll ever need to do (Burns's script for searching multiple search engines can easily be adjusted to include Google instead of Excite). In other cases, you'll have to roll up your sleeves and do some more work, but you'll have learned the techniques you need to do it (arrays, counters, math, randomization, prompts, variables, mouse events, and so forth).

Forms, rollovers, cookies... if you're looking to learn basic, meat-and-potatoes JavaScript, this book will get you there in a New York minute. (Bill Camarda)

Bill Camarda is a consultant, writer, and web/multimedia content developer with nearly 20 years' experience in helping technology companies deploy and market advanced software, computing, and networking products and services. He served for nearly ten years as vice president of a New Jersey–based marketing company, where he supervised a wide range of graphics and web design projects. His 15 books include Special Edition Using Word 2000 and Upgrading & Fixing Networks For Dummies®, Second Edition.

From The Critics
This approach to learning basic JavaScript presents 55 finished scripts and breaks them down individually. Burns (communications, Southeastern Louisiana University) addresses event handlers, flipping images, forms, math operators, clocks, and arrays. The second edition adds ten scripts from the author's HTML web site. Annotation c. Book News, Inc., Portland, OR (
Read More Show Less

Product Details

  • ISBN-13: 9780789720245
  • Publisher: Que
  • Publication date: 6/2/1999
  • Series: Other Programming Series
  • Edition description: Older Edition
  • Pages: 356
  • Product dimensions: 7.24 (w) x 9.04 (h) x 0.91 (d)

Meet the Author

Dr. Joe Burns is a professor of communications and the sole creator of the popular HTML Goodies Web site. He has been creating Web sites since the first version of Mosaic was released. Joe gets constant questions and feedback from his audience (over 150 e-mails a day!), and has used these insights to create better and better Web tutorials. Through HTML Goodies, he has taught hundreds of thousands of people how to build Web sites. His first book, HTML Goodies, has been very well received.

Read More Show Less

Read an Excerpt

Chapter 6: Mathematics, Random Things, and Loops

Lesson 30: Math Operators

This page will not only show you how to use numeric values to perform computation with JavaScript, but it will also test your basic math skills. There might be a test later. Its purpose is to introduce you to mathematical operators, something you'll use often. If you have done any type of computer programming before, you should be experiencing deja vu! If not, don't panic. Using this script, I'll give you an easy introduction:

 <SCRIPT LANGUAGE="javascript">
var result = 10 * 2 + 1 3 - 7 alert ("the answer to 10 * 2 + 1 / 3 - 7 is " result + ".") var numsums = 10 + 2 alert("10 + 2 is + numsums) var x = 10 alert("ten is " + x) var y = x * 2 alert("10 * 2 = " + y) var z = "Hello " + "Good Bye" alert(z) </SCRIPT>

The script's effect appears in Figure 6.1.
To see the effect on your own computer click on Lesson 3 0 Script's Effect in your download packet or see it online at

The Arithmetic Operators

I think it would hard to get to this point in the book and not be able to figure this one out pretty quickly. But it's not the makeup of the script that's important. The purpose here is to show you the JavaScript binary operators.

That's a fancy way to refer to the addition (+), subtraction (-), multiplication (*), and division (/) symbols.

Percent (%) is also a binary operator. Its technical name is a modulus operator. However, it doesn't create percentages. You actually have to create the percentages by hand, dividing one number into the other. The percent sign only returns any number left over, a remainder, in a division equation.

For example, the code 10 % 2 would return 0 because 2 divides into 10 evenly. But 10 % 3 would return the number 1. That's what's left over.

Deconstructing the Super Math Script

Well, maybe it's not super, but it makes its point.

Each two-line piece of code sets up a mathematical equation or number usage and then uses an alert method to display the answers. Here's the quick rundown:

We tried to create an equation that would use all the traditional binary operators. This is what came out. The answer is 13.333333333.

Now, when you look at the equation it might seem that the JavaScript is doing the wrong calculation. If you pull out a calculator and follow the format, you might come up with this:

10*2+1 (that equals 21) / 3-7 (that equals -4)

Right? Well, JavaScript doesn't see it that way. Remember, we're dealing with a computer here. That computer just bulls through left to right without stopping to see this as a division problem. If you simply read the equation straight through, you'll get the answer the computer did:

10*2 (equals 20) + 1/3 (a third) -7 = 13.333333

So how do you get around the computer bulling through? Parentheses, my friend. Remember that from high school algebra? In math, the stuff in the parentheses is evaluated first. Same here. If I wanted to turn this into a division problem with an equation on either side of the slash, it would look like this:

var result = (10 * 2 + 1) / (3 - 7)

Be careful when you put together mathematical equations in your JavaScript. Make sure the computer is figuring out what you want it to figure out. Always check the math against a calculator before offering your work to the public.

 var numsums = 10 + 2 alert("10 + 2 is " + numsums)

The script sets a numsums variable. Can you see that it's equal to 12 (10+2)? The script transfers that variable to an alert box and displays that 10 + 2 = the variable, or 12.

 var x = 10 alert("ten is " + x)

Another variable, x, is set to equal 10. The alert box then displays that value.

 var y = x * 2 alert("10 X 2 = " + y)

Another variable, y, is set to equal the x variable multiplied by 2. That should be 20, right? It is. The answer is displayed in the alert method.

 var z = "Hello " + "Good Bye" alert(z)

Finally, the variable z is created, showing you can connect text using the computation symbols. That variable is then displayed using the alert boxes. That will become very important later on.

The nice thing about the binary operator (+) is that it fulfils two duties. If it is placed between two numbers, it adds them. If it is placed between two strings, it puts them together into a single string, a process known as concatenation.

In Terms of Numbers and Binary Operators

Never put quotation marks around numbers. If you do put quotation marks around a number, it becomes a string. That's bad. For example, if you run the equation "3"+4, you will get 34 because the quotation marks made the "3" a string, and the plus sign simply put the two items together rather than adding them. If you want 7 to be the result, don't use any quotation marks so the plus sign sees both the 3 and the 4 as numbers.

Your Assignment

Write a script in which a prompt is used to ask the user for a number between 2 and 10. Then have that number's square display on the page.

You do know what a square is, right? The number times itself.

You can see a possible answer to this assignment on your own computer by clicking on Lesson 30 Assignment in your download packet or see it online at

Read More Show Less

Table of Contents

Why Now? 1
An Introduction 1
1 The Basics 7
2 Popping Up Text with Mouse Events 29
3 Manipulating Data and the Hierarchy of JavaScript 59
4 Flipping Images and Opening Windows with Mouse Events 87
5 Forms: A Great Way to Interact with Your Users 115
6 Mathematics, Random Things, and Loops 147
7 Clocks, Counts, and Scroll Text 175
8 Arrays 209
9 Putting It All Together 243
Script Tip 1 Rainbow Text 273
Script Tip 2 Full Text Data Script 283
Script Tip 3 Random Banner Ad Script 291
Script Tip 4 Frames Script 295
Script Tip 5 Search Multiple Search Engines 307
Script Tip 6 Image Proportion Script 317
Script Tip 7 A Calculator 329
Script Tip 8 Placing a Cookie 349
Script Tip 9 A 16.7 Million-Color Script 361
Script Tip 10 A Digital Clock with Image Display 373
A JavaScript Basic Concepts 383
B JavaScript Command Reference 389
C JavaScript Reserved Variable Words 427
D Scripts Available on 429
Index 459
Read More Show Less

Customer Reviews

Average Rating 3
( 7 )
Rating Distribution

5 Star


4 Star


3 Star


2 Star


1 Star


Your Rating:

Your Name: Create a Pen Name or

Barnes & 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 & 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 & 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 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


  • - By submitting a review, you grant to Barnes & and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Terms of Use.
  • - Barnes & reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & 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 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 all of 7 Customer Reviews
  • Posted November 28, 2011


    Nice experience...

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted May 29, 2002

    Total waste of a good tree

    Total junk. Worst programming book I've ever bought. Period. Code doesn't work half the time, poorly written, hokey presentation . . . PLEASE avoid this book!

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted June 15, 2002

    Excellent Beginner-Intermediate JavaScript Resource.

    I've been to Joe Burns' (the primary author) web site many times, before, and it actually introduced me to HTML. I learned a lot from that site, and after I'd learned everything I possibly could about HTML, I wanted to take it a step further and go into Dynamic HTML (DHTML). I knew JavaScript was the easiest to write and use, and since I knew our friend Joe had written a big fat book on it, I decided that it was the way to go. You absolutely must know a great deal of HTML to use this book, or any book for that matter. JavaScript shouldn't stand alone, and the book's examples and assignments do not exclude HTML source code. If you know HTML, you'll have an easy time learning JScript, if not, you won't get past Chapter 1, I guarantee it. Now that I've scared away the non-HTML folks, here's my enthusiastic review of the book: The book goes at a nice pace, fairly slow, because unlike HTML, JavaScript is a programming language. Because unlike HTML, JavaScript has conditional statements, variables, functions, loops, and a lot more. It really is a lot harder than HTML, but not as hard as the big bad languages like ASP and C++. Essentially, however, the pace goes on a curve. At the beginning you sort of dwell on small things longer, and do easier things with the concepts. Later on, though, you take things at full speed. Once the foundation is there, you'll start absorbing it like a sponge; pardon the trite simile there. Like the heading above would suggest, this book only covers beginning and intermediate JScript, so if you plan on decrypting some cool scripts you found, you'll probably only half-accomplish that goal. But don't leave just yet- what's in the book is the majority of JavaScript, and what's in the book is extremely well-written and easy to follow. This is probably because Joe is not exactly some programming wizard who knows all the languages. He's an ordinary guy, and he's a bit of a redneck to boot. We'll forgive him for his lack of knowledge of the order of operations, what a reciprocal is, and the fact that noon is not AM. Yes, he made all those errors, at one point criticizing computers (OH, NO!) for 'bulling through' equations, when the browser was really following the order of operations. Please excuse my dear Aunt Sally, for those of us who've forgotten it from junior high. Sorry, I like to ramble. In a nutshell, here's my review. Joe's easy to understand, he wrote it well, and it's taken at a slow pace. The assignments at the end of each lesson (each concept is its own lesson) and chapter are excellent practice, and greatly further your learning. At the end of the book you'll find reference, and ten cool scripts for commonly-requested tasks, like cookies, banner rotation, and more. You'll want to learn the advanced stuff when you're done, but until then, you'll really be glad you bought this book. I guarantee it.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted December 28, 2000

    reviewed by a begginer

    There are some interesting scripts in this book. However, many scripts aren't practical. There are many spelling mistakes and since Javascript is case-sensitive, those mistakes are unacceptable.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted May 2, 2000

    For absolute beginners only!

    This book might be O.K. for an absolute beginner, but anyone who has any programming experience of any kind should stay away. The author clearly has no idea about basic programming concepts because he sounds amazed by simple concepts such as variables, arrays, methods, and objects. Here are a few examples: In several places the author writes an if statement that will always be true so that 'we know the condition will run.' Huh? Obviously, if it is always true there is no need to have it! (See page 241 if you don't believe me.) Another example is the authors lack of understanding of the concept of operator precedence. He actually claims that '10 * 2 + 1 / 3 - 7' will evaluate 'left to right.' (See page 142 is you think I'm joking.) He also makes utterly stupid comments like, 'JavaScript counts everything,' again and again throughout the book. This book is totally worthless as a reference, but I thought it would at least have some cool scripts. Wrong! The scripts are very basic and generally not very useful. Don't be fooled by this book's low price either. It's not worth it! You will have to buy a real JavaScript book later anyway.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted May 13, 2000

    script never looked so easy

    This book made javascript easy to learn. However, I feel that if you didnt know much or nothing about java then things could have gotten scetchy there in the middle. Otherwise it helped me learn js quickly and easily.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted April 28, 2000

    The best book around for new Web Programmers!

    Joe Burns has absolutely outdone himself. If you are even mildly proficient with HTML and want to expand your skillset and really make your web pages come to life, then Javascript Goodies is the book for you. I've now read about 8 books about various web-talks: Java Applets, Javascript, CSS, HTML 4.0, DHTML, ASP.... This is by far the easiest book to read, yet also has a rapid curriculum which means you can have javscript electrifying your pages in minutes....literally! I can't say enough good things about this book. If you don't know javscript, muster up the courage to give it a whirl with Javascript Goodies and you won't be sorry.

    Was this review helpful? Yes  No   Report this review
Sort by: Showing all of 7 Customer Reviews

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