0
我有一个包含多个记录的网格视图。有两种类型的记录:recordTypeA和recordTypeB。对于recordTypeA我想限制我可以打开的子窗口。我不能同时打开两个recordTypeA副本(重复)。例如,如果打开查询字符串ID为1的recordTypeA,我不想让recordTypeA id 1打开另一个窗口,但如果它们具有不同的查询字符串ID,则可以打开两个recordTypeA。根据记录ID限制子窗口
var g_windowReference = null;
function openwindow(windowUrl, isnotRecordB)
{
var windowFeatures = "toolbar=no,menubar=no,scrollbars=yes,resizable=yes,location=no,status=yes";
if (typeof isnotRecordB == 'undefined')
{
g_windowReference = window.open(windowUrl, windowFeatures);
g_windowReference.focus();
}
else
{
window.open(windowUrl, windowFeatures);
window.focus();
}
return false;
}
function closeWindow(windowUrl)
{
if ((g_windowReference !== null) && (g_windowReference.closed === false))
{
g_windowReference.close();
g_windowReference = null;
}
}
此代码工作正常,除非我打开recordTypeA ID为1,然后用recordTypeA ID 2. ID为2的记录将覆盖第一个让我可以在不同的窗口与1打开纪录的两倍。
如何才能达到理想的行为?
请帮帮忙,
谢谢
谢谢你,它完美的作品。 –
不客气! – 11thdimension