Delayed Image Preloading Using Mootools
It’s almost three months ago since my last post! I’m quite busy at the moment. That’s why I’ll just write a quickie on delayed image preloading using Mootools (1.2.1, also might work with 1.2 and 1.1).
It’s almost three months ago since my last post! I’m quite busy at the moment. That’s why I’ll just write a quickie on delayed image preloading using Mootools (1.2.1, also might work with 1.2 and 1.1).
I tested a few looping techniques in the past, but I found a benchmark page which shows over 40 looping techniques and their running times. You can find the benchmark over here.
Yesterday I was playing around with the Google AJAX Feed API. With the API, you can download any public Atom or RSS feed using only javascript. By mixing the Google AJAX Feed API with MooTools 1.2, I wrote a tiny feed reader application in 30 lines of javascript goodness.
In this post I’ll present a way to send javascript functions over JSON from a php server (but it should work on other platforms too). Since PHP version 5.20 PHP includes the functions json_encode() and json_decode(). These functions encode values into JSON formatting and decode JSON formatted strings into associative arrays. The json_encode() function is not able to encode a value into a (javascript) function. This is a common issue when configuring graphs from Flotr (my Javascript plotting library) with JSON data. Here are my findings.