Last day I had to hack a webshop's basket management system, and deleting the items had to be done via AJAX. The problem was, that each call had to wait the previous to be completed, otherwise some products kept in the session. The solution was simple: call the AJAX requests recursively on the 'onComplete' event.
Here is a cleaned up code, using MooTools 1.2.4. Call addAjaxParam() to prepare the ajaxParams array.
var ajaxParams = [];
function addAjaxParam( pid )
{
var obj = {
'option': 'module_shop_action',
'product_id': pid
}
ajaxParams.push( obj );
}
I'm a little bit lazy and I prefer the challenging parts of coding, not the boring, repetitive ones. I read somewhere that a great percentage of development time is spent on creating basic CRUD functionality. I had to find something to get rid of this, so I did a little research on which is the best tool for PHP to generate CRUD source code.
Since I was using CodeIgniter for a while, I searched the forums for CRUD solutions and I found this forum thread. After downloading the package, I instantly loved the idea, that you can generate CRUD code based on source code templates. Just a click and models, views, controllers are ready to use, customized for your database schema.
Although the 1.1 is really cool, I missed a lot of features, that I added later.
8
Read more
I'm not a designer. I just simply love good design. The web is not an endless, abstract space that consists of unique pages. You will find the same elements, over and over again: forms, horizontal menus, vertical menus, lightboxes, etc. These standard elements, needs to be designed, and this is where patterns will emerge. Here are some good sites that collects these patterns:
5
Read more
All rights reserved, ©2008-2010 - Built on CodeIgniter framework - Konami codes - Mostly Valid XHTML 1.1 - Valid CSS 2.1