Grails

Sharing Session Information between WordPress and Grails using Cookies and base64 encoding

A scenario arose in one of our projects that we had to share some information between the grails application (which was taking care of dynamic content) and wordpress (which was used to maintain the static pages about the application). The information was the logged in user's name so that we could display that on the header. After giving...

by Vivek Krishna
Tag: javascript
03-Aug-2010

Technology

jQuery Alert Message without using traditional javascript alert-box.

This post might help you if you want to display alert messages without using tradition javascript (irritating) alert. To achieve this you need jQuery for your frontend UI. Below is the javascript method (code snapshot) which displays your message for 5 seconds. And then fades out automatically. function displayAlertMessage(message)...

by Salil
Tag: javascript
14-Jun-2010

Technology

Identify merchant provider from the given credit card no.

Hi Friends, I was working on the financial application, where the user doesn't want to select merchant provider while feeding in credit card details and yet we needed to know the merchant provider. Following is the code that helped: function getMerchantProvider(cardNo){ //cardNo is the credit card number ...

by Amit Jain
Tag: javascript
04-Nov-2009

Technology

Ajax Request Progress Indicator

In my current project, I used ajax to fetch data from the server to provide experience like Desktop Application. I wanted to automatically show an indicator when an AJAX request is ongoing, and hide it when there is no such request. So I found the following solution for both the Prototype library and the JQuery library. Make sure the...

by Bhagwat Kumar
Tag: javascript
12-Oct-2009

Technology

Add hotkeys to the web application

Let us have a look at the simple javascript code, that can be used to add hotkeys to our web application. I tried using jquery hotkeys plugin and two more plugins, but they didn't work for me. So I ended up handling the keydown event of my own. var isAlt = false; document.onkeyup = function(e) { if (e.which == 18) //18 is...

by Amit Jain
Tag: javascript
28-Sep-2009

Grails

How to use $.getJSON() method of jQuery with grails?

How to use $.getJSON() method of jQuery with grails? Retriving a JSON string from Grails is very easy. You have to just write the following in your controller's action Let me explain you with an example of populating a HTML table using JSON response: In this example, we have table with columns - name,address and gender. We want the...

by Chandan Luthra
Tag: javascript
02-Mar-2009