I was busy doing full-time work and some side jobs lately. Felt guilty for not updating my blog.. LOL..Anyways. My first Joomla site is at http://www.canadianpardoncenter.ca Joomla project is what I am trying to concentrate on lately to produce complex web application based on already complex CMS platform. There are tons of useful modules and […]
Monthly Archives: April 2012
Useful Captcha Plugin “Secuimage” in PHP
Hi, lately I am focusing on a project using PHP framework ThinkPHP. It has its own Captcha extension which is not good enough. So I did some research on the web. One of the helpful link will beĀ 10 Free CAPTCHA scripts and services for websites. And then I picked one of them. It is called […]
jQuery: Add Field Dynamically with Entered Value Kept
Hi, I was doing some little fun code at work in a project. One of things in common tasks was to add fields in HTML Form area. For example, people may just need to add more information with extra input fields rather than the fixed hard-coded fields in HTML page. Then adding fields dynamically would […]
Javascript – Retrieve the browser size to determine the div position
Lately I was assigned to do Ads Campaign Module in one of my projects. Clients wish that the ads section needs to be displayed in a fixed position even if the web page is scrolled up and down. So one of my tasks is to calculate the browser size and define the fixed position of […]
jQuery: check phone number input field with format “000-000-0000” with keyup option
It is another day with another common front-end input field checking problem, so I decide to resolve this problem once for all. The goal is simple, it is to type into the phone number input field with number value, and it will automatically format the value into certain formation, such as “000-000-0000”; and no other […]
Javascript – how to check real integer number
This problem has been bothering me for quite some time. Here is a nice and simple solution I found in Google. The credit should be given to this guy: http://www.inventpartners.com/content/javascript_is_int The code is showing in the following: function is_int(value){ if((parseFloat(value) == parseInt(value)) && !isNaN(value)){ return true; } else { return false; } }function is_int(value){ if((parseFloat(value) […]
PHP – Ads Campaign: Randomly Select Ads with Different Priority
Recently I was assigned a task to implement a full Ads Campaign Model with Controller and View. The basic requirement for this Ads Campaign is to randomly select Ads from Database, and the Ads with higher Priority value should have a better chance to be selected. Thus, I use TINYINT to represent this Ads Priority […]