This is how i set style (color here) of all of the options of a select list using jQuery. In my case i had select options like this: <select id=”select_list_id”> <option value=”#595959″>Grey</option> <option value=”#000000″>Black</option> <option value=”#036″>Blue</option> <option value=”#363″>Green</option> <option value=”#632423″>Red</option>…
Setting execution time and memory limits in php
When executing large amount of data through php scripts it is common facing errors like “Fatal error: Maximum execution time of 300 seconds exceeded..”. Also, sometimes uploading large files through php scripts you might face errors like “The uploaded file…
Simple captcha component for CakePHP 1.x
Updated on – April 11, 2013 Download Captcha Component for CakePHP 1.x Download Captcha Component for Cakephp 2.x Model validation to validate captcha field value included with examples. Functions(rules) required for model validation are also written in the model file.…
Resume download of PART extension file in Firefox
In some cases, when a large file had been downloaded through Mozilla Firefox, downloading of file gets interrupted for some reason. The Firefox would tag the download as “failed” and you are left with nothing but a .PART file. You…
Better way to write php code – part 2
With the help of an example i would explain a very common but erroneous approach new php developers seem to follow (i have seen some ‘old’ ones repeating the same error though). Here it is,
Better way to write php code – part 1
A few tips on writing php code that can save a php developer a lot of future troubles and “huffs and puffs” occurring due to different php compiler settings, changing of hosting environment etc. Here is first one.
Gmail like ajax loading message at the top of page
Here is a sample javascript code to show Gmail like “Loading.. Please wait..” message at the top of a HTML page while making Ajax requests. Irrespective of the position of Ajax links within web page, the “Loading” message will show…
WordPress custom permalinks and 404 error
Today morning i found that urls to postings of this very blog of mine were ending on a “HTTP 404 – File not found” page. (It had been working last night for sure) I had got custom permalink configured for…
Creating new virtual host in Windows
Step by step guide to create virtual host on Windows XP or Window7 (WAMP installed) Navigate to: C:\Windows\System32\drivers\etc and open the file named ‘hosts’ in a text editor. You should see 1 or more lines that have an ip address,…
Hindi language plugin for Joomla
Check this really cool tinyMCE extension to make your Joomla post content to appear in Hindi. It supports as many as Eight Indian languages including Devanagari(Hindi), Gurumukhi(Punjabi) and Bengoli. It is really easy to install and get going.