Ok I had simplified my original question. I have an ordinary html window in which all I attach is a menu. Then when users click on menus it calls the doMenuOption function which creates new window. Here is the doMenuOption:
function doMenuOption(type,id,xsize,ysize,hdr,url,opparams,singleuser)
{
switch(type)
{
case "FRMPK":
winMenuOpts.window(id).show();
winMenuOpts.window(id).park();
case "FRM":
if (winMenuOpts.isWindow(id) == true)
{
winMenuOpts.window(id).show();
winMenuOpts.window(id).bringToTop();
winMenuOpts.window(id).center();
mnuUser.removeItem(id);
if (winMenuOpts.window(id).isParked() == true)
{
winMenuOpts.window(id).park();
}
}
else
{
winMenuOpts.createWindow(id,20,20,xsize,ysize);
if (xsize == 10)
{
winMenuOpts.window(id).maximize();
}
winMenuOpts.window(id).center();
winMenuOpts.window(id).setText(hdr);
if(opparams != '')
{
winMenuOpts.window(id).attachURL(url+"/"+CurrUserID+"?"+opparams);
}
else
{
winMenuOpts.window(id).attachURL(url+"/"+CurrUserID);
}
winMenuOpts.window(id).button('minmax1').hide();
winMenuOpts.window(id).button('minmax1').disable();
winMenuOpts.window(id).denyResize();
}
break;
I use the above to create a window in which is the following code:
This then opens another window which has the id of ‘winAddEditCost’. This window has the Header with the button showing ‘Test’. Inside this window I have the following code in the onLoad Event:
Please note that in the second code window where I create the button it is showing the attribute name=‘btnShowLiveDel’. However that is because I was testing something else. I had that originally as id=‘btnShowLiveDel’ and it still didn’t work.
I’m not sure what it is you are finding difficult to understand. I have a base html document in which there is a menu attached. I have a doMenuOption function which creates new windows as necessary. If I create a new window and set it’s header to include a button with id=‘XYZ’ please can you tell me how I can access that button from inside the new window?
That is all I’m asking. How would it help to have an HTML structure?
It’s possible that what I’m trying to do can’t be done, in which case just please tell me that it is not possible to do and I’ll try and think of another way.