@AK86For hitting the servlet after page load, you can use something similar to: $(window).load(function() {
// executes when complete page is fully loaded, including all frames, objects and images
alert("window is loaded");
}); or (function(window, document, Granite, $) {
"use strict";
//...