background preloader

Js

Facebook Twitter

50 Excellent AJAX Tutorials « Best Web Design. AJAX provides Web developers with plenty of opportunities to enhance the user experience and improve the performance of their websites.

50 Excellent AJAX Tutorials « Best Web Design

There are countless ways that AJAX can be used, and fortunately there are plenty of good and useful AJAX tutorials out there to help you with your own implementation. This post serves as a collection of useful tutorials on working with AJAX in a wide variety of ways. You’ll find tutorials on working with forms, building shopping carts, creating chat features, working with log-ins and usernames and much more. JSON AJAX Web Chat Tutorial. This tutorial will walk you through the steps to create an JSON AJAX driven website. This tutorial is very similar to the original AJAX Web Chat tutorial that I wrote back in November of 2005, but instead of passing the message data back as XML, we will be using JSON.

Download The JSON AJAX Chat Source Code View AJAX Web Chat in Action I just recently discovered the joys of JSON after reading about it for months. As the SecretGeek puts it: Two months ago you'd heard of JSON One month ago you'd heard the term but paid no attention One week ago you'd heard it mentioned a few times and started to think, Today you woke up with an alarm bell ringing in the back of your mind that said WHAT THE BLOODY HELL IS THIS JSON THING AND WHY IS IT EVERYWHERE ALL OF A BLOODY SUDDEN! Writing XML using JavaScript. Download source - 2.23 Kb Introduction My most recent project makes heavy use of remote scripting (or what some people might call AJAX).

Writing XML using JavaScript

As such, I wanted an easy way to write XML from JavaScript so that it could be sent to my server. Now, there might be a very simple way of doing this, but I don’t know it if there is. So I decided to write a JavaScript object to simplify the process of writing XML. Using the code The object is called XMLWriter. The XMLWriter object can be created with the JavaScript new command like so: var XML = new XMLWriter(); The XMLWriter object has the following public methods: OpenFaces. jQuery SWFObject. The jQuery SWFObject plugin is an addon for jQuery that lets you easily embed flash movies on a page.

jQuery SWFObject

This plugin gives you the best of both worlds; you get the power of SWFObject within the jQuery API. The latest version, 1.1.1, is based on the latest SWFObject version 2.2. The project was started in 2009 with permission from the SWFObject team. iPhone & iPod Detection Using JavaScript. Detecting Smartphones Using JavaScript. Don't you wish there were an easy way to detect whether your web site visitor is connecting with a desktop PC or a mobile device of some sort? The good news is that it's sort of easy to detect some devices using JavaScript to parse the UserAgent string. Just remember that there are lots of important caveats, including: Configure your download. jQuery UI Download Builder Quick downloads: Release Candidate (Themes) (1.12.0-rc.2: for jQuery1.7+) | Stable (Themes) (1.11.4: for jQuery1.6+) | Legacy (Themes) (1.10.4: for jQuery1.6+) | Legacy (Themes) (1.9.2: for jQuery1.6+) All jQuery UI Downloads Version Components UI Core A required dependency, contains basic functions and initializers.

Configure your download

Interactions These add basic behaviors to any element and are used by many components below. Widgets Full-featured UI Controls - each has a range of options and is fully themeable. Effects. Docs - Element/Element. The following functions are treated as Window methods.

Docs - Element/Element

Function: document.id The document.id function has a dual purpose: Getting the element by its id, and making an element in Internet Explorer "grab" all the Element methods. Make Your Flash Site iPhone and iPad Friendly. Everyone seems to be talking about how the iPhone and iPad don’t support Flash but I haven’t seen much discussion on what to actually do about it if you have a Flash site.

Make Your Flash Site iPhone and iPad Friendly

Flash might not be coming to the iPhone anytime soon but there are actually simple things you can do to make any Flash site iPhone/iPad/iPod touch compatible, as well as work on any mobile device and be accessible to users without Flash installed. Every Flash site should attempt to make all content accessible to all users but sadly most sites don’t do this. » Download all the source code and examples here To begin, download the above zip file which contains a full Flash site that is completely iPhone/iPad/iPod touch/mobile friendly. It also contains all code samples shown below, including all HTML, CSS, and JavaScript for a fully functional mobile site. Jquery-fadein-fadeout-transparent-png-ie7-chrome-590295.

Trim a string in JavaScript - developer.loftdigital.com. JavaScript Timers with setTimeout and setInterval. Home : Articles : JavaScript Timers with setTimeout and setInterval Tutorial by Matt Doyle | Level: Intermediate | Published on 15 January 2007 Categories: In this tutorial we'll look at JavaScript's setTimeout(), clearTimeout(), setInterval() and clearInterval() methods, and show how to use them to set timers and create delayed actions.

JavaScript Timers with setTimeout and setInterval

JavaScript features a handy couple of methods of the window object: setTimeout() and setInterval(). These let you run a piece of JavaScript code at some point in the future. SetTimeout() window.setTimeout() allows you to specify that a piece of JavaScript code (called an expression ) will be run a specified number of milliseconds from when the setTimeout() method was called. SetTimeout ( , ); where is the JavaScript code to run after milliseconds have elapsed. setTimeout() also returns a numeric timeout ID that can be used to track the timeout. Here's a simple example: Try it yourself! Click the button below to see it in action: clearTimeout() clearTimeout ( );