Ajax Archives - Webmonkey
twitter [http://twitter.com/webmonkey] facebook RSS Feeds Search for: Webmonkey The Web Developer's Resource Web Dev & Design Ajax Backend Blog Publishing CSS Databases Fonts HTML HTML 5 Frameworks JavaScript Mobile Multimedia Programming Security UI/UX Web Standards Software & Apps Browsers Software Web Apps Platform & APIs APIs Identity Location Social Web Services Reference Color Charts HTML Cheat Sheets Special Characters Glossary Templates Code Snippets Archive for the ‘Ajax’ Category File Under: Ajax , UI/UX Jul 21 2010 Beautify Broken Links With Catch404 By Michael Calore The 404 error is one of the bitter realities of the web. “The page you’ve requested does not exist.” So cold and unforgiving. Unlike a bad database connection or an unresponsive server, the 404 Page Not Found error has a finality to it — this link is dead and it’s never coming back. But now we have Catch404 by Addy Osmani, a jQuery plug in that handles broken links with style. Deploy Catch404 on your site, and instead of seeing a page reporting a broken link, the user is presented with an Ajax modal window (also called a hop-up, or a lightbox) informing them the linked page isn’t there. The windows also offers some alternate destinations they might want to check out. We’ve been trying to make 404s go down a little easier for years now. The custom 404 page is a popular solution. It’s available on just about every web CMS out there. You can do it yourself , too. Browsers are also taking it upon themselves to beautify the broken link with custom pages , offering suggestions or inviting users to search for the page using a built-in search box. Catch404 takes both of those ideas — the custom alert and the suggestions of what to do next — and places them into the user experience before the link is even loaded. The plugin, which requires the jQuery framework , sends the link off to Yahoo’s YQL engine to check to make sure it’s alive. It only performs this check for external URLs; local URLs don’t require the check. The check is performed behind the scenes, using an Ajax request. If all is good, the user goes about his or her way. If the check results in a 404, the user sees the modal window. Here’s a demo . You’ll notice one obvious downside, which is that your users will have to wait an extra half-second or so while the YQL call completes. So why use it? When a user is browsing your site and clicks on a link you’ve provided, then sees a 404 error, it’s your problem whether you’re responsible or not. Linking to dead pages makes you look like a sloppy curator, and the user will place some, if not all, of the blame for that error on you. Catch404 is more helpful than an impersonal error. If the speed hit from the cross-site link checking bothers you, consider adding Catch404 only to legacy content — those years-old pages filled with links that may or may not still be alive. Activating Catch404 is simply a matter of assigning a class to the link, so you can invoke it only where it makes sense. [via Delicious ] See Also: Get Started With JQuery JQuery Celebrates 4 Years on the Web With New Release The Solar System, Rendered in CSS and HTML Tags: 404 , Ajax , Catch404 , jQuery Post Comment | Comments (2) | Permalink Share on Facebook shares Reddit Digg Stumble Upon Email File Under: Ajax , JavaScript , Web Apps Jun 3 2010 Beautiful Websites: Slippy for Presentations By Michael Calore Jordi Boggiano has created Slippy , a lightweight library for building animated, browser-based slideshow presentations. Slippy is very simple — check out a short demo and view the source code. Grab the code from github . It’s written in HTML and it uses JQuery for the interactions (touch the space bar, use the arrow keys, or click the mouse to go to the next slide). It also uses Syntax Highlighter , a bit of JavaScript that pretties up snippets of code — we use Syntax Highlighter for tutorials here on Webmonkey — so it’s especially useful for presentations where you’re showing code examples. Jordi points out that Slippy can run your scripts in pretty alert() boxes (rather than the standard, boring browser alerts) to show your examples in action. Composing a presentation is simple. Just hack a basic HTML file. Each slide is in its own
, and all the markup beyond that is standard HTML. Bravo! See Also: Beautiful Websites: Former Apple Designer’s Amazing Photo Gallery Get Started With JQuery NYT Shows Off Real-Time Tweet Tracker During Stevenote Tags: beautiful websites , JavaScript , jQuery Post Comment | Comments (8) | Permalink Share on Facebook shares Reddit Digg Stumble Upon Email File Under: Ajax Feb 16 2010 Ajax for Beginners By Webmonkey Staff JavaScript has had the XMLHttpRequest object for almost a decade now, but it really only started getting wide attention in 2004. All this attention was mostly due to some showoff web applications that made every developer who saw them think, “I want my site to do that!” But it also has to do with the spiffy, spiffy name given to it by the folks at AdaptivePath, who named this asynchronized application Ajax . Maybe you’ve heard of it? A few high-profile Google applications in particular made a splash with Ajax: Maps and Gmail were first. It also powers some of the core functionality in the user interface of the ever-so-popular photo sharing site Flickr . By now, Ajax has become integral to the fabric of the web, especially in the era of real-time applications like Twitter , Buzz and Wave (all of which use Ajax extensively in their webapp front ends, for the record). Ajax may also lay claim to being the first JavaScript object with its own fan website . Date.com doesn’t count, although I did have a scintillating chat with a lady there once about the getTimeZoneoffset method. Continue Reading “Ajax for Beginners” » Tags: tutorial , wiki Post Comment | Comments (8) | Permalink Share on Facebook shares Reddit Digg Stumble Upon Email File Under: Ajax Feb 15 2010 Ajax Essay Grader By Webmonkey Staff This automatic essay grader is a simple example of an Ajax (XMLHttprequest) interaction from Paul Adams’ Ajax for Beginners tutorial on Webmonkey. Continue Reading “Ajax Essay Grader” » Tags: wiki Post Comment | Comments (4) | Permalink Share on Facebook shares Reddit Digg Stumble Upon Email File Under: Ajax Feb 15 2010 Ajax Drop-down Menu By Webmonkey Staff This code, which was written by Adam Duvander, will create a simple Ajax drop-down menu. Continue Reading “Ajax Drop-down Menu” » Tags: wiki Post Comment | Comments (3) | Permalink Share on Facebook shares Reddit Digg Stumble Upon Email « OLDER POSTS Webmonkey’s Picks Browse Our Tutorials HTML, JavaScript, design and more Cheat Sheets HTML, CSS and special characters Color Charts Brighten up your pages Cut & Paste Code Templates and snippets you can steal Recent Articles The Two Flavors of a ‘One Web’ Approach: Responsive vs. Adaptive Internet Explorer 10 Doubles Its Desktop Market Share WebRTC, Online Code Editor Team Up for Real-Time Coding Video: What Does 10 Petabytes of Data Look Like? The Very First Website Returns to the Web Recent Tweets Sitemap | FAQ | Contact Us | WIRED Staff | Advertising | Press Center | Subscription Services | Newsletter | RSS Feeds Condé Nast Web Sites: Webmonkey | Reddit | ArsTechnica | Details | Golf Digest | GQ | New Yorker Subscribe to a magazine: View All Titles Allure Architectural Digest Bon Appétit Brides Condé Nast Traveler Details Glamour Golf Digest Golf World GQ Lucky Self Teen Vogue The New Yorker Vanity Fair Vogue W WIRED Condé Nast web sites: Allure Architectural Digest ArsTechnica Bon Appétit Brides.com Condé Nast Traveler Condé Nast Portfolio Concierge Details Epicurious Glamour Golf Digest Golf World GQ Hotel Chatter Jaunted Lucky Nutrition Data Reddit Self Style.com Teen Vogue The New Yorker Vanity Fair Vogue Webmonkey W International Sites: Wired UK Wired Italy Wired Japan WIRED.com © 2014 Condé Nast. All rights reserved. Use of this Site constitutes acceptance of our User Agreement (effective 3/21/12) and Privacy Policy (effective 3/21/12) . Your California Privacy Rights . The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of Condé Nast . Ad Choices