summaryrefslogtreecommitdiff
path: root/BKUOnline
diff options
context:
space:
mode:
authormcentner <mcentner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2010-07-15 12:31:39 +0000
committermcentner <mcentner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2010-07-15 12:31:39 +0000
commit1d9102799524d7bbf2be1f865e40ecc308d786ae (patch)
tree134072fc4f94e1ce9c4cea05c85ca277737e6ae0 /BKUOnline
parent4e09bdc2fabe9155732b47f16fff793522d743bf (diff)
downloadmocca-1d9102799524d7bbf2be1f865e40ecc308d786ae.tar.gz
mocca-1d9102799524d7bbf2be1f865e40ecc308d786ae.tar.bz2
mocca-1d9102799524d7bbf2be1f865e40ecc308d786ae.zip
Fixed issue with iframe detection.
git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@779 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
Diffstat (limited to 'BKUOnline')
-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}"/>;