O'Reilly logo

JavaScript for Absolute Beginners by Terry McNavage

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 10. Scripting BOM

A while ago, I worked a scene in the Russell Crowe and Liam Neeson film The Next Three Days. Probably the thing that surprised me most was how dynamic things were on set. Paul Haggis, who won two Oscars for Crash, kept reworking the content of the scene, especially the timing; he must have had Jason Beghe (Detective Quinn) run out of every single door in the precinct and say, "We found his son!" each time. Oftentimes Haggis would tell us what to do just moments before filming another take. Needless to say, having a good short-term memory was vital.

Now in JavaScript, those things (dynamic content, timing, short-term memory) are the purview of the Browser Object Model (BOM). For dynamic content, there's XMLHttpRequest, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required