summaryrefslogtreecommitdiff
path: root/BKUOnline/src/main/webapp/applet.jsp
diff options
context:
space:
mode:
Diffstat (limited to 'BKUOnline/src/main/webapp/applet.jsp')
-rw-r--r--BKUOnline/src/main/webapp/applet.jsp8
1 files changed, 7 insertions, 1 deletions
diff --git a/BKUOnline/src/main/webapp/applet.jsp b/BKUOnline/src/main/webapp/applet.jsp
index bf20efb0..625f1f6b 100644
--- a/BKUOnline/src/main/webapp/applet.jsp
+++ b/BKUOnline/src/main/webapp/applet.jsp
@@ -128,7 +128,13 @@
</style>
<script type="text/javascript" src="https://www.java.com/js/deployJava.js"></script>
<script type="text/javascript">
- var iframe = false; // Does not work in IE8: (top.location.href != window.location.href);
+ var iframe = false;
+ try {
+ iframe = top.location.href != window.location.href;
+ } catch (e) {
+ // if window.location can not be accessed we are most likely in an iframe
+ iframe = true;
+ }
var fontSize = 100;
var width = <c:out value="${requestScope.moccaParam.appletWidth}" default="${defaultWidth}"/>;
var height = <c:out value="${requestScope.moccaParam.appletHeight}" default="${defaultHeight}"/>;