diff options
author | mcentner <mcentner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4> | 2010-07-15 12:31:39 +0000 |
---|---|---|
committer | mcentner <mcentner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4> | 2010-07-15 12:31:39 +0000 |
commit | 1d9102799524d7bbf2be1f865e40ecc308d786ae (patch) | |
tree | 134072fc4f94e1ce9c4cea05c85ca277737e6ae0 /BKUOnline | |
parent | 4e09bdc2fabe9155732b47f16fff793522d743bf (diff) | |
download | mocca-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.jsp | 8 |
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}"/>; |