Monthly Archives: July 2011

JavaScript: how to load dynamic contents (HTML String, JSON) to iframe

The story Although people are suggesting the replacement of <iframe> by <div> due to the poor usability of <iframe>,  there are still some cases that <iframe> is the only way to go. Consider such case : you want to show a preview screen before the user hit “submit” button on a page with form (the […]

Yet another Javascript Internationalization (i18n) module

i18n? Internationalize (a.k.a. i18n) is a very basic practice when working with multi-lingual websites. A simple i18n mechanism involves only a dictionary containing the pairs of strings, and a dictionary lookup function (e.g. the underscore magic function _() ). Once these two things are ready, the implementation is relatively simple. Major programming frameworks also provide […]

PHP isset() and multi-dimentional array

** The issue discussed in this post has been fixed since PHP5.4.0, so the below discussion and solution are for PHP 5.3.x or lower. Thanks David for clarifying. A few weeks ago I covered how to check the existence of an array element in PHP. In the post I explained why isset() is dangerous to […]