Child window closes in IE9 on click of Button
So I have this javascript code onclick of button for a child window which is opened from a parent window.
try{
window.opener.item(23,Add,document.AddEdit.name.value,document.AddEdit.type.value);
} catch(err){
alert('The form you are editing is not available.');
}
item
function in parent window -
function ite开发者_如何学编程m(id,action,name,type){
saveScroll();
document.abc.itemId.value = id;
document.abc.itemAction.value = action;
document.abc.itemName.value = name;
document.abc.itemType.value = type;
document.abc.submit();
}
So somehow I am getting the error from catch
block. But this happens only in IE9, it works perfectly in firefox, IE8, chrome. So the error is "Member Not Found". Has anyone faced this issue in IE9?
I'm not sure since I don't have IE, but have you tried declaring 'item' like this instead:-
var item = function(id, action, name, type) {
//etc
}
The other thing I'd try is renaming 'item' to something else just in case there's some name clash...
精彩评论