Javascript & Ajax For Dummies Here

"I'm JavaScript," the character chirped. "I'm the logic of the browser. I can make things move, validate forms, and create pop-ups. But if you want to talk to the server without that annoying page blink, you need my friend, ."

Suddenly, a glowing book appeared on his desk: by Andy Harris. The cover promised to help him build websites that "work like pros". JavaScript & AJAX for Dummies

"AJAX stands for ," the messenger explained, though he whispered that most people use JSON nowadays because it's faster and lighter. "Think of me as a secret agent. While you’re looking at the page, I run to the server in the background, grab exactly what you need, and bring it back without anyone ever seeing the page reload". Dave was skeptical. "Is it hard to learn?" "I'm JavaScript," the character chirped

The agent is hired and the path to the server is opened. But if you want to talk to the

Once upon a time in the land of Static-Web, a young developer named Dave sat in front of his monitor, sighing. Every time a visitor clicked a button on his site, the entire page vanished for a second, blinked white, and then reloaded everything from scratch just to show one tiny line of text. It was like a waiter at a restaurant who, every time you asked for a clean fork, insisted on taking your food back to the kitchen, remodeling the dining room, and then bringing everything back out again. "There has to be a better way," Dave muttered.

The agent reaches the server and says "Hello!" The server acknowledges with a status code—hopefully the famous 200 OK .