MozillaZine

Bug in javascript rendered pages

User Help for Seamonkey and Mozilla Suite
Greg C. Miller
Guest
 

Post Posted November 19th, 2003, 11:44 am

I've discovered that if you render multiple pages completely in javascript in a framed environment, when you click the back button, your scripts no longer have permission to access functions that they should have, example follows:
// file nutscrape_frames.htm
<HTML>
<HEAD><SCRIPT>
function generate_error() {
alert("Hey it works");
}
function generate_new_display() {
top.display.document.open();
top.display.document.write("After clicking the BACK button, click on <a href='javascript:top.generate_error()'>generate error</a> and the javascript link will no longer work, instead generating an uncaught exception: permission denied in the javascript console");
top.display.document.close();
}
</SCRIPT>
<TITLE>Header</TITLE>
</HEAD> <FRAMESET ROWS="100,*"> <FRAME SRC="nutscape.htm" NAME="cbar">
<FRAME SRC="about:blank" NAME="display"> <NOFRAMES>
<BODY>
<P><I>This document requires a browser that can view frames.</I></P>
</BODY> </NOFRAMES></FRAMESET>
</HTML>
// file nutscape.htm
<HTML>
<HEAD>
<TITLE></TITLE>
</HEAD>
<BODY>
<P><A HREF="javascript:top.generate_new_display();">Click this twice to dynamically render a new Page</A>
then click the BACK button</P> </BODY>
</HTML>

Return to SeaMonkey Support


Who is online

Users browsing this forum: Bing [Bot] and 3 guests