Javascript | Jun 12, 2008

Sending Javascript Functions Over JSON

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.

read this article

Javascript | Oct 29, 2007

Javascript left-hand assignment

Wouldn’t it be great to do something like this in javascript:

function test(){
	return ['first!', 'second!'];

[first, second] = test();

alert(first); // should say 'first!'
alert(second); // should say 'second!'

read this article

Mootools | Dec 18, 2006

Mootools: JSON explained

I haven’t seen much tutorials around explaining using JSON with mootools, so I decided to write one. A year ago I always thought JSON’s a hard to understand way to have your client apps communicate with a server. Well, by using mootools it’s a breeze. If you don’t know what JSON is, check out says the following about JSON:

read this article