Home › Forums › General XMetaL Discussion › XMetal marco unable to run window.open(url) › Reply To: XMetal marco unable to run window.open(url)
Reply to: XMetal marco unable to run window.open(url)
July 6, 2017 at 3:59 pmHi Derek,
I was able to run my js using the sample http://forums.xmetal.com/index.php/topic,514.0.html, but once the event takes place in the browser window, it doesn't report the event back to XMetal.
I have the mcr set to :
ResourceManager.Visible = true;
ResourceManager.RemoveTab( “Assets” );
ResourceManager.RemoveTab( “Desktop” );
ResourceManager.RemoveAllTabs();
ResourceManager.AddTab(“Web Service”,”Shell.Explorer”);
ResourceManager.SelectTab(“Web Service”);
WebService = ResourceManager.ControlInTab( “Web Service” );
WebService.navigate( “file:///C:/Program%20Files%20(x86)/XMetaL%209.0/Author/Forms/resManTest.html” );
]]>
And the html file looks like :
window.open(“http://hw-en-daem-ap01:8080″,”Picker”)
if(window.addEventListener) {
window.addEventListener(“message”, receiveMessage, false);
}//if
else if (window.attachEvent) {
window.attachEvent(“onmessage”, receiveMessage, false);
}//else
function receiveMessage(event) {
console.log(“Received message from: ” + event.origin);
}
The receiveMessage is never called.