I have this set of Javascript code that works fine in IE (any version), but won’t work on Mozilla Firefox or Google Chrome. Can someone advise me why?
function returnData(strCode,strProgramCode,strName)
{
parent.opener.document.all.txtCourseCode[7].value = strCode;
parent.opener.document.all.txtProgram[7].value = strProgramCode;
parent.opener.document.getElementById("txtCourseName8").innerHTML = strName;
window.close()
}
FYI, this Javascript is embedded into a .aspx page that was written using .NET Framework 1.1.
Edit Doesn’t work means: none of the lines executed although they were explicitly invoked.
Example: window.close() doesn’t close the window
document.allis an IE-only property, so obviously it won’t work in other browsers.You shouldn’t use
document.allanyway. By the look of things, you’re actually wanting: