I have created 2 buttons. The second button should go to NewFile.html but it isn't working. my index.html main file consist of div tag inside it created 2 buttons and with id ForNext for one of the button.
main.js
var pagesHistory = [];
var currentPage = {};
var path = "";
function wlCommonInit(){
$('#ForDeviceProp').click(deviceProp);
$('#ForNext').click(nextMethod);
}
function nextMethod() {
$("#ForNext").load(path + "pages/NewFile.html", function(){
$.getScript(path + "js/NewPage.js", function() {
if (currentPage.init) {
currentPage.init();
}
});
});
}
Newpage.js
currentPage = {};
currentPage.init = function(){
WL.Logger.debug("NewFile :: init");
};
There are all sort of issues, but the main ones are the following:
$("#ForNext").load("pages/NewFile.html", function(){
It needs to be loaded into the
pagePort
DIV. Replace "ForNext" with "pagePort".bba= WL.Client.getEnvironmen();
, you are missing the "t" in ".getEnvironment".