I'm getting a "SCRIPT16389: Unspecified error" for simply defining a small piece of Javascript. This thing works in all browsers EXCEPT IE (yeah, freaking IE -- don't get me started). I am testing this in IE10, but I was told that this is also happening in IE11.
This is all I have in my code where it's failing (!!!):
<script type="text/javascript">
var isChild;
if (window.opener == null) { isChild = false } else { isChild = true }
</script>
I've looked at other posts that have this same error. None of them answers my question.
Ideas, anyone?!?
I'm getting a "SCRIPT16389: Unspecified error" for simply defining a small piece of Javascript. This thing works in all browsers EXCEPT IE (yeah, freaking IE -- don't get me started). I am testing this in IE10, but I was told that this is also happening in IE11.
This is all I have in my code where it's failing (!!!):
<script type="text/javascript">
var isChild;
if (window.opener == null) { isChild = false } else { isChild = true }
</script>
I've looked at other posts that have this same error. None of them answers my question.
Ideas, anyone?!?
Share Improve this question asked Apr 22, 2015 at 15:39 Ray K.Ray K. 2,5113 gold badges25 silver badges40 bronze badges 9 | Show 4 more comments1 Answer
Reset to default 12I have since discovered that IE spits out this generic error if it doesn't like a piece of Javascript code.
I don't remember specifically what the Javascript issue was for this question, but I do remember that once I resolved it, this error went away.
EDIT: I seem to keep getting downvotes on this, so let me clarify what I'm talking about. What I'm saying is that a Javascript error -- ANY Javascript error, not something specific -- will cause the SCRIPT16389 error to appear. If you resolve the error -- whatever it is you're getting -- then the SCRIPT16389 should disappear.
window.opener
is not supported in IE if the opener is in a different security zone. Check your levels of security in IE and see if the problem occurs again. – Ciprian Commented Apr 22, 2015 at 15:46var isChild = window.opener != null;
:-) – T.J. Crowder Commented Apr 22, 2015 at 15:48