Invoke Lightbox2 on page load? Good question! If you have got frustrated searching for a solution to it, relax, it’s here! Just place the following snippet of javascript code in your web page’s <head> section:
Customizing mysql query of a bound model
I had a hasAndBelongsToMany binding in my Charity Model as i normally would need all the “Causes” available along with Charity information and vice-versa. At one place i needed a specific number of “Causes” picked randomly from the database table.…
Creating Ajax form in Cakephp (with Prototype.js)
(If you are using jQuery with cakephp you may want to view this article, Creating Ajax form in Cakephp using jQuery ) With the help of prototype/JavaScript we can build really cool and fully functional ajax form in CakePHP really…
Browser detect script in javascript
I found this useful and up-to-date article to detect browser in JavaScript. Please refer to the author’s site page for detailed explanation.
When Firebug made life easier
It’s been around three years now i have been using the Firebug. This great tool provides a web developer an easy way to look at and inspect the source code of a web page. You can view and experiment with…
Clear template cache in x-cart
Have you been making changing into a smarty template file (within x-cart and perhaps independently as well) for long and the changes would not come up at all? Who could tell better how frustrating this can be! The simplest and…
More shorter way to load models on the fly
This post has been marked as deprecated. You can use “loadModel” controller method to load models on the fly. For more information of this method please visit http://api.cakephp.org/class/controller#method-ControllerloadModel. Thank you.
How to position a pop up element on mouse position coordinates with jquery
Here is a simple yet useful trick to position a tooltip (a div element etc) near the mouse click or pointer position using jQuery. In the example here, we have a tool tip (div) with id “tooltip”, a href tag,…
Positioning a pop up element on a browser window
While working in my last CakePHP project i needed a piece of javascript code that should help me in positioning a absolute pop up element near mouse click. I had been using prototype library for javascript stuff so i looked…
Limitation on the number of characters in jquery ajax response
The following jquery ajax call would return approx. 8442 characters in its “html” response. Content exceeding this number would be truncated.