🇵🇸 Call for a #CeasefireNOW 🇵🇸

Act Now

Happy Life with Intuitive API in Smart Controls

In this post I will show you an example of how smartly built controls and API’s can make the developers programming life extremely enjoyable, hopefully this example will urge you in giving such a smart effort when you build your own control or API. Lately I have been playing around with a very nice tree control based on jQuery called jsTree. One of the nice features is that it allows populating the tree through asynchronous calls with JSON data representation. In order to achieve that, you needed to provide the data by JSON special format suitable to the tree. This format, regrettably, is open to the JSON vulnerability Phil Haack talked about in his two posts here and here. So to avoid this vulnerability I had to change this default data format of the tree, at least until the very end of the data flow just before the tree populates the data, only then I can change it back to the default format, like the following: ...

June 15, 2010 Âˇ Emad Alashi

Clear jQuery Droppable List

The other day at work I finally had the chance to get my hands on code (see here why I’m so anxious about it 😛 ). We were using the jQuery’s Drag and Drop feature, where the droppable areas (DIV’s) are marked as droppable and registered for the events like the following: 126 function RegisterDroppable(DomID) { 128 $(‘#' + DomID).droppable({ ...

May 19, 2009 Âˇ Emad Alashi

JavaScript Date Object and Code Convention

“is Code Convention important?”, I couldn’t find better time to answer this with a big, decorated, shiny, flashing “YES” more than now! I was doing some coding with JavaScript in which I needed to create a Date object and add to it 30 days, simple job! So I did the following: var x = new Date(); ...

February 26, 2009 Âˇ Emad Alashi