background preloader

JavaScript - Table of Contents

JavaScript - Table of Contents

Writing Responsible JavaScript Without a doubt, JavaScript has been making something of a comeback in the last year. If you’re involved in client-side development in any way at all, chances are that you’re finding yourself writing more JavaScript now than you have in a long time. If you learned most of your JavaScript back when DHTML was all the rage and before DOM Scripting was in vogue, there have been some big shifts in the way scripts are written. Most of these are in the way event handlers are assigned and functions declared. Both of these changes are driven by the desire to write scripts that are responsible page citizens, both in not tying behaviour to content and in taking care not to conflict with other scripts. Event Handling Back in the heady days of Web 1.0, if you wanted to have an object on the page react to something like a click, you would simply go ahead and attach an onclick attribute. <a id="anim-link" href="#" onclick="playAnimation()">Play the animation</a> It’s all in the timing Creating An Object

Web / Programming / JavaScript - WebReference.com JavaScript is an easy-to-use programming language that is common on Web pages. It can enhance the dynamics and interactive features of your site with small amounts of code. Ajax (Asynchronous JavaScript and XML), is a group of inter-related Web development techniques (including JavaScript, PHP, among others) used for creating interactive Web applications. Dojo.behavior: Write Modularized HTML Document Event Handling The dojo.behavior module provides a simple and lightweight mechanism for listening to HTML document events. The Dojo Publish/Subscribe Event Mechanism Learn how to use the Dojo Toolkit's versatile ContentPane widget to load dynamic content into your Web pages. Post a Message on a Facebook Wall with JavaScript Allowing your visitors to easily post links to your website on Facebook can really boost traffic. Loading Dynamic HTML Content Using the Dijit ContentPane Load dynamic content into your Web pages using the Dojo Toolkit's versatile ContentPane widget. Mixing Scripting Languages

jQuery hacks.oreilly.com -- O&#039;Reilly Hacks Series Here’s a special post from Hackszine – great way to follow all the authors from our HACKS series…. Ed note: In this guest post, veteran Hacks series author Paul Bausch takes on a challenge that’s been on my todo list for a while, providing a solution that should be of immediate interest to all readers of this site and just might serve as a seed for future hacking around here. I have a shelf full of O’Reilly Hacks books across a wide range of subjects. I contributed a couple in the Web Applications category, but I also have Hacks books about digital photography, hardware, scripting languages, gaming, and operating systems. The series has introduced me to a number of authors who are doing unusual things with technology in their particular area of expertise. So I went on a mission to gather the Hacks authors’ blogs using the tools I know best: Web Applications. I plugged the feeds into Google Reader, and renamed each feed the author’s full name. Related: Phillip Torrone Related

Six JavaScript features we do not need any longer - Wait till I Notice: The following is a “best practice document”. You can follow its advice and live happily ever after, but there might be situations where you cannot apply the ideas mentioned within. This is especially the case when you have to maintain an old product or complex web application. You cannot replace everything in those in one go – as you are very lucky indeed if you get the time and budget – but you can tackle those step by step. According to many web designers at @media2005, JavaScript is sexy again, and in demand. Working largely with b2b sites and restricted environments, I never knew it was out of fashion. It is a tool, much like a shovel, a screwdriver or a towel. You can use a screwdriver to screw in screws or to clean your ears, however, the latter needs real skill, determination and a lack of fear of injuring yourself. Here are some danger signs you encounter in many a bad script example and tutorials written in the spur of the moment rather than following proper research.

ViewLikeUs - Check Sites in Various Resolutions! 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. 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 : Vous noterez que ce document fort simple n’affiche pour l’instant que le titre du document - nanti d’un lien hypertexte vide - du fait du style display:none appliqué au paragraphe principal. Magique non ? Et l’accessibilité dans tout ça ? php <?

20 Things the average person doesn&#039;t know about XP 1. It boasts how long it can stay up. Go to the Command Prompt in the Accessories menu from the All Programs start button option, and then type 'systeminfo'. The computer will produce a lot of useful info, including the uptime. If you want to keep these, type 'systeminfo > info.txt'. This creates a file called info.txt you can look at later with Notepad. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. Performance tips for JavaScript 3 performance tips for JavaScript As our JavaScript applications get larger and ever more sophisticated, the need for efficient scripting becomes increasingly important and hard to bypass. Back in the days when all that JavaScript could do was change your document's background color, or validate a simple form, abuse in terms of efficiency in our codes was common, with the browser not having a problem with it at all. Now, especially with the language's marriage with DHTML, in turn, the ability to create almost full blown applications, efficiency is no longer something we can sweep under the rug, and forget about. In this tutorial, I'll show you a trio of important and generic tips for improving performance in your JavaScript codes. Pop in your favorite tune, and let's sweat JavaScript to the old East! Tip 1: Cache your objects! One of the best kept secrets to boosting script performance is to cache your objects. In the above, the object "document.images" is what's accessed multiple times.

Web Pages That Suck - learn good web design by looking at bad web design - Home Page dp.SyntaxHighlighter AJAX, DHTML and JavaScript Libraries Today JavaScript is widely used by web developers. There are a lot of libraries to add special effects, simple way to implement Ajax, complex components, forms, tabs or everything else. Here’s a collection of Ajax, Javascript and DHTML Libraries. Prototype is a JavaScript Framework that aims to ease development of dynamic web applications. AHAH is a very simple technique for dynamically updating web pages using JavaScript . dojo is an Open Source DHTML toolkit written in JavaScript. AjaxAC is an open-source framework written in PHP, used to develop/create/generate AJAX applications. JSAN – JavaScript Archive Network is a comprehensive resource for Open Source JavaScript libraries and software. Ajax.NET Professional is one of the first AJAX frameworks available for Microsoft ASP.NET and is working with .NET 1.1 and 2.0. AjaxRequest Library is a layer over the XMLHttpRequest functionality which makes the communication between Javascript and the server easier for developers.

Related: