background preloader

Ajax

Facebook Twitter

Framework

Scriptaculous. LightWindow. Flot - Google Code. SIMILE Project. Serving JavaScript Fast. Spotlight-Like Search As You Type With CSS, AJAX & JS. OS X has a lot of great effects. These are great building blocks for creating effects for the web. You might have seen my previous tutorial on creating a Dashboard-Like effect using JS and CSS. This tutorial will show you how to create a Spotlight-Like effect for your search boxes.

Take a look at the picture to the right to see where we are headed: You can preview the finished effect here. This example will search through 3 text files of lists of names of celebrities, athletes, and presidents. What we need to do Create the HTML markupStyle a bit with CSSWrite our Javascript codeWrite the PHP code to return the search resultsFinish up the CSSTie everything together I should note here that we are going to use PHP, but any scripting language will do. Create the HTML markup We’re first going to start by laying out our HTML. You might notice that we are using script.aculo.us. Line 3 points to our javascript file. This is the code that does a few things. That’s it for our HTML. Moving on. Objectifying JavaScript.

The web professional's online magazine of choice. In: Columns > Behind the Curtain By Jonathan Snook Published on September 18, 2006 When I first began programming with JavaScript, I created my variables and then encapsulated any functionality I needed to reuse into a function. In JavaScript, a function is an object; creating a function creates an object. As scripts get larger, functions become more interrelated.

In a true object-oriented sense, an object represents a thing. The important idea here is simply that objects encapsulate related functionality. In JavaScript, we often perform a series of tasks on existing objects. We’ve established that objects are good and useful, but how do we go about creating them? Using the object literalusing the new keyword with a function Let’s shed some light on these options, and the advantages and disadvantages of each. Using the Object Literal Creating a new object using the object literal syntax is very straightforward. Example: Creating Objects Prototype. Speed Up Your Javascript Load Time. Javascript is becoming increasingly popular on websites, from loading dynamic data via AJAX to adding special effects to your page.

Unfortunately, these features come at a price: you must often rely on heavy Javascript libraries that can add dozens or even hundreds of kilobytes to your page. Users hate waiting, so here are a few techniques you can use to trim down your sites. (Check out part 2 for downloadable examples.) Find The Flab Like any optimization technique, it helps to measure and figure out what parts are taking the longest. 1. 2. 3. Disgusted by the bloat? Compress Your Javascript First, you can try to make the javascript file smaller itself.

You can do this, but these tools can be finnicky and may make unwanted changes if your code isn’t formatted properly. 1. 2. Install the YUI Compressor (it requires Java), then run it from the command-line (x.y.z is the version you downloaded): java -jar yuicompressor-x.y.z.jar myfile.js -o myfile-min.js Debugging Compressed Javascript. QuirksMode. JonDesign's (Javascript) SmoothGallery. Web 2.0 Wiki. jQuery. JavaScript. Effets javascript avec Prototype et Scriptaculous. On a vu fleurir moult trolls velus à propos du web 2.0 et sa débauche d’AJAX et de javaScript inaccessibles, je ne les nourrirai pas ici. Par contre et pour ceux que ça interesse, les librairies prototype et script.aculo.us proposent des outils et effets très sympathiques.

Voici quelques exemples très simples d’utilisation. Installation Le plus simple est de récupérer la dernière version de scriptaculous qui contient elle même une version toujours récente de prototype. Ceci fait, decompactez l’archive et copiez les librairies dans un répertoires de votre serveur web. Pour ma part, je mets tout ça dans un répertoire js. Il ne reste qu’à les appeller dans l’entête de votre document HTML : xml <html><head><title>Mon test</title><script type="text/javascript" src="js/prototype.js"></script><script type="text/javascript" src="js/scriptaculous.js"></script></head> ...

Utilisation Réalisons un petit document HTML pour commencer à utiliser quelques effets scriptaculaires : Magique non ? Php <? Dp.SyntaxHighlighter. DHTMLgoodies.com. Dhteumeuleu. DHTML Color Picker. Carte de visite web 2.0. Anatomy of a Drag and Drop. The mechanics of a drag and drop are pretty interesting and most library implementations do similar things, albeit to various extents. As I explain the inner workings, I'll touch on Yahoo's, Mootools', and Script.aculo.us' implementations, what to expect, and how they differ.

A drag and drop essentially consists of a few events (and by events, I mean, moments in time, not DOM events). There's the moment a drag is started, there's the continuous dragging of an item, and finally there's the moment the item is no longer being dragged (ie: the drop). The items being dragged are sometimes referred to as draggables. On top of these events, there is also the interaction with other elements on the page; dragging over and out of an element and whether the dragged element has been dropped on top of another element on the page. The elements upon which draggable items are dropped onto are sometimes referred to as droppables. Starting the Drag Alternatively, this could be attached to a drag handle. Ajax Patterns. Ajax Lessons. 45 applications web 2.0 françaises. Avant la conférence LeWeb3 qui aura lieu en début de semaine prochaine à Paris, je me suis dit qu’il serait intéressant de lister les principaux acteurs français de cette nouvelle vague de sites web 2.0.

On se focalise souvent sur les startups américaines, mais il y a chez nous des jeunes pousses qui planchent actuellement sur des applications et des services web tous aussi prometteurs. Il y a une dynamique incroyable en ce moment, personne ne peut le nier. D’ailleurs pourquoi commence-t-on à parler de bulle 2.0 (en référence à la crise de 2000 qui a suivit l’avènement des premières startups) ?

C’est bien que le secteur du business Internet est en effervescence. D’ailleurs, si vous voulez découvrir plus en détail ce que revêt ce terme, je vous conseille ce site. Voici donc une liste (certainement pas exhaustive, mais je vous invite à mes laisser des commentaires afin de la compléter) d’applications web 2.0 conçues par des français. Commerce en ligne Emploi Information Jeux Loisirs Photo Vidéo.