DebugBar Forums
 
 HOME 
 DOWNLOAD 
 BUY 
 DOC / WIKI 
 FORUM 
 CONTACT 
Stay tuned : rss feed

Forum Home


advanced search


You are not logged in.

Announcement

When reporting a problem or a bug :
* Provide your OS version (INCLUDING service pack) and installed IE version.
* Provide your IETester version
* Provide the IE Tab version opened to generate the problem
* Provide a test case with a sample url or sample code to reproduce the problem
* Provide a step by step explanation on how to reproduce the problem.
* If needed provide additional information.

Thanks.

#1 2008-10-14 17:14:13

frafu
New member
Registered: 2008-10-14
Posts: 1

Redirect in frames

Hi!

I have noticed a strange behaviour after i installed companion.js.
Simple test scenario with a tomcat JSP server.

Main.jsp:

Code:

<html>
<head>
    <title>Test</title>
</head>
<frameset rows="200,*">
    <frame name="f1" src="Test.jsp">
    <frame name="f1" src="Test.jsp?redirect=true">
</frameset>
</html>

Test.jsp:

Code:

<%
    if(request.getParameter("redirect")!=null) {
        response.sendRedirect("Test.jsp");
    }
%>
<html>
<head>
    <script type="text/javascript">
        window["undefined"]=window["undefined"];
    </script>
</head>
<body onload='document.getElementById("a").innerHTML=window["undefined"];'>
<div id='a'></div>
</body>
</html>

As you can see, the Main.jsp has a frame construct with two frames. The first frame is called directly with "Test.jsp". The javascript in this frame works fine.
The second frame calls "Test.jsp?redirect=true". In Test.jsp is now sent a redirect to Test.jsp without parameter. This is done with a response Code  307 Temporary Redirect. The browser now gets Test.jsp without any parameter and the site will be delivered.
But in this case I get the JS error: "Permission denied" for the window object.

In the end, both frames get exactly the same html code but with the difference of the former redirect.

When i uninstall companion.js everything works fine.

best regards
  frafu

Offline

 

Partners : Debugbar | Mobilier de bureau | Debugbar Wiki | IEForge | Lampes design | La fourmi créative