Well, it still doesn't appear to be working. Am I still missing something?
js code:
// if a menu item is clicked
function OnEvent_MenuClicked(sMenuId, nLocation, iOriginWnd)
{
if(sMenuId == "start")
{
if (OpenWnd) // checks for another instance of the browser
{
Debug.Trace("> Detected OpenWnd: " + OpenWnd)
Debug.Trace("> No more windows allowed!")
MsgPlus.CreateWnd("Windows.xml", "WndMaximum", 0)
// creates a warning alert window
}
else
{
Debug.Trace("> Detected OpenWnd: " + OpenWnd);
Debug.Trace("> Window allowed!");
Wnd = MsgPlus.CreateWnd("Windows.xml", "WndBrowser", 0);
// creates a browser window (variable 'Wnd')
OpenWnd = true;
Browser = Wnd.Browser_GetInterface("Browser");
Browser.GoHome();
}
}
js code:
// if a browser button is clicked
function OnWndBrowserEvent_CtrlClicked(objWnd, strControlId)
{
switch(strControlId)
{
case "BtnSearch": // if the search button is clicked
SearchWnd = MsgPlus.CreateChildWnd(Wnd, "Windows.xml", "WndSearch", 100, 100);
// creates a child window (parent = 'Wnd')
break;
}
}
I have also tried putting your code in, exactly how it was, but only the main window appeared - the child window just didn't appear...