After i had installed WAMP on Windows 7 the loading of web pages on my localhost server slowed down considerably. After negotiating with it for a few days i decided to find the culprit out and ultimately i reached at…
Author: Arvind Kumar
Fix to jQuery plugin does not work on ajax loaded content
I had been loading table records through ajax pagination using jquery. Some of the urls/links (View Details, Edit and Delete) in loaded content had been using thickbox to handle respective requests. Although, if i did’t use the ajax to load…
Cakephp pagination and custom named arguments handling
Let’s have a look at the scenario first. I have a “contacts” controller, a “display” action in it(controller) and a view “display.ctp” to show results. As normal my “display” action lists all the contacts by calling $this->set(‘contacts’, $this->paginate(‘Contact’)) inside the…
Calculating difference between two mysql dates in seconds
Here is a quick way to calculate the difference between two mysql dates in number of seconds. In my case, i required to fetch all entries for which the difference between current time stamp and date in a table field…
Creating Ajax form in Cakephp using jQuery
Because of its being more flexible, extensible and precise nature the jQuery certainly has emerged as a more popular Javascript library as compared to prototype library. If you plan your Cakephp application depend heavily on Javascript, its right time to…
A note on DOM elements’ changed scope when using thickbox with jQuery
A similar situation may arise (atleast for me it did) when you try to invoke jQuery’s “thickbox” in conjunction with a custom onclick firing. I would explain it with the help of an example: I have a div element (with…
Javascript common mistake of comparing with NaN and not with isNaN
Recently, i fell into the trap of NaN and isNaN and it turned me pulling my hair for quite a few good minutes. Thats why i decided to make a note of it here for a recitation and as a…
Setting Style/CSS of select options using jQuery
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.…