WebDialogBox Focus issue

7 replies. Last post: January 3, 2011 6:26 AM by Handy Surya
Tags :
  • New Discussion
  • New Question
  • New Product Feedback
Frank BruceMember

I write a js Funtion On page.When press 'Esc' key ,it call 'closeDialog()',then Close 'WebDialogBox1'.
But how I judge that 'WebDialogBox1' whether or not   to has focus????
(like webgrid'S way grid.HasFocus() )
Anyone can help me?thanks!

</head>
<body onkeydown="buyShortKey()">
function buyShortKey() {
     if (event.keyCode == 27) {
    closeDialog();
    }
}


//
Close WebDialogBox1


function closeDialog() { var grid2 = ISGetObject("WebGrid2"); var grid1 = ISGetObject("WebGrid1"); if (grid2.HasFocus() == true) { var dlgBoxAbout = ISGetObject("WebDialogBox1"); dlgBoxAbout.CloseDialog(); grid1.SetFocus(); grid1.RootTable.GetRow(0).Select(); var goCell = grid1.RootTable.GetRow(0).GetCell('tradecode'); goCell.ActivateEdit(); } }
All times are GMT -5. The time now is 8:26 PM.
Previous Next