So, I am using IBM Worklight where I have the main file called file1.html and then I created another html file called file2.html.
I am trying to open file2 but no luck so far. I tried following pieces of code:
-
$(this).load("file2.html"); -
$("div1").load("file2.html"); //div1 is the id for outer div of file1 -
WL.App.openUrl("file2.html"); -
window.openURL("file2.html");
And none of these worked! Any suggestions?
If you want to use jQuery, the .load() function is the correct function you are after;
But you are missing the
#from the div1 id selector in the example 2)This should work: