Handle session timeout in Ajax request

Recently, I was working on a grails application in which I wanted to handle session timeout when ajax request was fired. When session expires in case of normal request, the browser redirects to login page which is handled by spring security.   In case of Ajax...

Persist Content loaded via AJAX

Hi Folks! Recently, I was working on a web application and I was thinking of making extensive use of AJAX so that the whole page would not have to be loaded again and again. These days single page web applications(SPA) are becoming quite popular. We load a main page...

Jquery Validate Plugin

There are several ways to perform validation on html forms but nothing can beat the flexibility and easiness of jQuery’s validation plug-in. The advantage of using this plugin is that you don’t have to write the validation rules from the scratch(ofcourse, thats...

Add marker and lines on Google Map

Working with Google Map and add marker and lines on Map. This tutorial is explaining how to start with Google Map. 1) First create a account on developer console and create project and generate public key. 2) Create a html page. <!DOCTYPE html> <html>...

jQuery Select2 with ajax in grails

jQuery Select2 is an awesome jQuery plugin. It provides very interactive UI for select drop downs. Select2 comes with AJAX support built in. Instead of giving list to select you can make ajax request and get dynamic data. Following are the steps to get the dynamic...