I was making a page with frames. One is a treeview frame, the other is showing a report. When I click the item in the left frame, the report will display in the right frame. But after I click the first item, the location object in the right frame became unavailable! Which prevents me from opening a new report in the same frame! Below is the main page code:
<iframe src ="demoFramesetLeftFrame.jsp" name="treeframe" id="treeframe" height="100%" width="200px" frameborder="0">
<iframe src="demoFramesetRightFrame.jsp" name="basefrm" id="basefrm" height="100%" width="" frameborder="0">
The basefrm is response for displaying the report. Does anyone know how to solve this? Thanks a million!
It sounds like the navigation from the left frame is taking the right frame to a page on a different hostname. Then the right frame’s
windowproperties includinglocationare inaccessible to code in the parent page due to the Same origin policy.You can still navigate a frame without using its window’s
locationobject. Just set thesrcattribute on theiframeobject itself (in the parent document).(Also consider not using frames for navigation like this. You’ll be making your separate reports unbookmarkable.)