在IE11上运行以下脚本时出现脚本错误。
错误:
SCRIPT5007: Unable to get property 'setActionableButtonState' of undefined or null reference
File: infoall.js, Line: 995, Column: 3
我的代码:
function setInfoActionableButtonState(enable)
{
for (var i = 0; i < sections.names.length; ++i)
{
var frame = rs.getPane(sections.names[i]);
if(typeof frame.setActionableButtonState != "undefined" && frame.setActionableButtonState != null)
{
try
{
frame.setActionableButtonState(enable);
}
catch(e)
{
}
}
}
}
答案 0 :(得分:0)
错误消息表明您的frame
变量为null
或undefined
。您可能希望在检查frame
属性之前检查setActionableButtonState
是否已设置。
// |- === HERE ===
if(typeof frame != "undefined" && typeof frame.setActionableButtonState != "undefined" && ...)