1.Old PrototypeJS Script: var loc = document.location.pathname;var tail = "webengine/generated/Init"loc = loc.substr(0,loc.indexOf(tail));var url = loc.concat("protect/RouterServlet?NAV_MENU=TRUEGREEN_NAV=TRUE");new Ajax.Request(url,{method
1.Old PrototypeJS Script:
var loc = document.location.pathname; var tail = "webengine/generated/Init" loc = loc.substr(0,loc.indexOf(tail)); var url = loc.concat("protect/RouterServlet?NAV_MENU=TRUE&GREEN_NAV=TRUE"); new Ajax.Request(url,{method:'get', onSuccess:function(request){ var elemAjxResp = request.responseText; document.getElementById('com-navigation').innerHTML = elemAjxResp;; }});
2. Use Dojo Ajax and dom operation;
require(["dojo/_base/xhr", "dojo/dom", "dojo/domReady!"], function(xhr, dom) { xhr.get({ url: url, load: function(newContent) { dom.byId("com-navigation").innerHTML = newContent; }, error: function() { } }); });