I am using YUI DataTable in my web application. While my DataTable is fetching the data if I close that and move on to other DataTable I keep getting the message 'Stop running this Script?' confirm message. I want to avoid this message and I want to stop the script from running as soon as I close the DataTable. Please give your suggestions. Please let me know if you need more info. I am making a webservice call from JavaScript to populate DataTable. I suspect that is causing the prompt. I would require a way to stop script from executing webservice call
Showing DataTable: ShowDialog(DisambigPanel, ReturnElement) document.getElementById("DisambigList").focus();
DisambigDataSource = new YAHOO.util.DataSource(DisData[CurDisType].URL);
DisambigDataSource.responseType = YAHOO.util.DataSource.TYPE_XML;
DisambigDataSource.responseSchema = {resultNode: DisData[CurDisType].Node, fields: DisData[CurDisType].Fields};
var TableConfig =
{
sortedBy: {key:DisData[CurDisType].SortKey, dir:"asc"},
selectionMode: "single",
initialRequest: BuildRequestString(),
scrollable: true,
width: "940px",
height: "340px",
renderLoopSize: 20
};
YAHOO.widget.DataTable.MSG_LOADING = "<img src=\"/Images/Wait/DataGrid.gif\" alt=\"Loading animation\"/> Loading...";
YAHOO.widget.DataTable.MSG_EMPTY = "No results.";
DisambigTable = new YAHOO.widget.DataTable("DisambigList", DisData[CurDisType].ColumnHeaders, DisambigDataSource, TableConfig);
YAHOO.util.Event.removeListener("DisambigList", "keydown");
YAHOO.util.Event.addListener("DisambigList","keydown",DisambigKeyDown);
DisambigTable.subscribe("initEvent",DisambigLoad);
DisambigTable.subscribe("cellDblclickEvent",DisambigSelect);
DisambigTable.subscribe("rowSelectEvent",DisambigSelectionChange)
function ShowDialog(dialog,returnFocus) { OldFocus = returnFocus; VisibleDialog = dialog;
dialog.show()
var x = new YAHOO.util.KeyListener(document, { keys:27 }, { fn: HideDialog, scope:dialog, correctScope:true } );
x.enable();
dialog.cfg.queueProperty("keylisteners", x);
}
function HideDialog()
{
// Hide the current dialog, if one is visible
if (VisibleDialog)
{
// Hide the current dialog
VisibleDialog.hide();
VisibleDialog = null;
}
if (OldFocus)
{
OldFocus.focus();
OldFocus = null;
}
}