background preloader


Facebook Twitter

Mastering JSON ( JavaScript Object Notation ) Filed: Tue, Apr 10 2007 under Programming|| Tags: JSON javascript objects ajax Widely hailed as the successor to XML in the browser, JSON aspires to be nothing more than a simple, and elegant data format for the exchange of information between the browser and server; and in doing this simple task it will usher in the next version of the World Wide Web itself.

Mastering JSON ( JavaScript Object Notation )

The Object: An Introduction Behold, an Object… var myFirstObject = {}; It may not look like much, but those squiggly braces have the potential to record every bit of information humanity has ever gathered, and express the most complex programs computer scientists can dream up. Creating A New Object The old way to create a new object was to use the new keyword. var myJSON = new Object(); This method has been deprecated now in favor of simply defining an empty object with squigly braces… var myJSON = {}; Objects as Data.


Fancybox. Perfection kills » Understanding delete. A couple of weeks ago, I had a chance to glance through Stoyan Stefanov’s Object-Oriented Javascript.

Perfection kills » Understanding delete

The book had an exceptionally high rating on Amazon (12 reviews with 5 stars), so I was curious to see if it was something worth recommending. I started reading through chapter on functions, and really enjoyed the way things were explained there; the flow of examples was structured in such nice, progressive way, it seemed even beginners would grasp it easily. However, almost immediately I stumbled upon an interesting misconception present throughout the entire chapter — deleting functions. There were some other mistakes (such as the difference between function declarations and function expressions), but we aren't going to talk about them now.

The book claims that “function is treated as a normal variable—it can be copied to a different variable and even deleted.”. >>> var sum = function(a, b) {return a + b;} >>> var add = sum; >>> delete sum true >>> typeof sum; "undefined" Theory§

Positioning Elements

Jx - JavaScript Ajax Library. Jx is a small toolkit for providing AJAX support in JavaScript.

jx - JavaScript Ajax Library

It has two different version - jx and jxs. jx - Lite Vesion - V3.00.A This provides the most basic Ajax support. It is striped down to minimise file size - so it will not support many advanced features. You can pass data to the server side script using the GET method only. See a line by line explanation of what the code does... Demo jx Demonstration. Features Supports GET methodSupports JSON.Small Size (>1 KB compressed / 2.3 KB with all the comments)Very easy to use. Samples. JSON for the masses. Sunday Feb 19 2006 Your co-workers will love you for writing in JSON because it will most likely not conflict with their scripts that are being called within the same web documents.

JSON for the masses

For Many Years... JavaScript has been portrayed as a very ugly language. It's been abused, misunderstood, and kicked around like the poor step-child as known in fairytales. That's all going to end this year. Libraries like prototype,, behavior, and Rico have all made their debut in 2005 and topping the charts of development circles as some of the greatest things to happen for web developers. Why? Because JSON is here. JavaScript Kit Advanced JavaScript Tutorials.

Main > JavaScript Tutorials Latest Tutorials Introduction to Touch events in JavaScript Preloading images and executing code only after all images have loaded Setting CSS3 properties using JavaScript Going beyond cookies- Using DOM sessionStorage and localStorage to persist larger amounts of info Using document.createElement() to test for browser support for an element The onmousewheel event of JavaScript Handling runtime errors in JavaScript using try/catch/finally The try/catch/finally statement of JavaScript lets you dip your toes into error prune territory and "reroute" when a runtime error has occurred.

JavaScript Kit Advanced JavaScript Tutorials

Dynamically loading an external JavaScript or CSS file External JavaScript or CSS files do not always have to be synchronously loaded as part of the page, but dynamically as well. JavaScript and memory leaks If you're not careful, your JavaScript code may leak memory and sometimes even bring the visitor's browser to its knees. 40 JavaScript lightboxes(included jQuery and MooTools) More an more sites are using(or going to use) JavaScript(library or plain) on there website(s).

40 JavaScript lightboxes(included jQuery and MooTools)

You probably dont see much of these javascript pieces, but one cool piece of JavaScript cant be missed, and it’s called a lightbox. A JavaScript ligthbox is a fast growing way to present in a nice way an images or something else like inline html, video or an external site without opening a new window. In the old days most images(or other content) where presented in a new tab/window, which isn’t a pretty way to do this if you ask me. AJAX Introduction. Ajaxload - Ajax loading gif generator. jQuery: The Write Less, Do More, JavaScript Library.