Closed
Bug 341838
Opened 20 years ago
Closed 19 years ago
cannot call child (iframe) function from parent (or from child to parent) after click 'Back' button
Categories
(Firefox :: General, defect)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: haichu_ni, Unassigned)
References
Details
(Whiteboard: CLOSEME 07/09)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4
Load the included the following html Firefox, click button ‘Init Child’ more than 2 times, click on the ‘Back’ on the tool bar once, then clicks either ‘Call Child’ or ‘Call Child’ cause firefox to issue ‘Permisson denied to get property Window.func’ exception.
Please not, if the the 'Back' button had not been clicked, both function calls (either from parent to child or child to parent) would work.
the test html:
<html>
<head>
<script type='text/javascript'>
var count=0;
function initchild() {
count++;
var iframeWin = frames['iFrame'];
var iframeDoc = iframeWin.document;
var newDoc=iframeDoc.open("text/html")
var txt = "<html><head>";
txt += "<script type='text/javascript'>";
txt += "function func() {alert('called from parent "+count+"');}";
txt += "function callParent() {parent.func("+count+");}";
txt += "<\/script>";
txt += "</head>";
txt += "<body>";
txt += "<input type='button' onclick='callParent()' value='Call Parnet" +count+"'>";
txt += "</body></html>";
newDoc.write(txt);
newDoc.close();
}
function func(c) {
alert("called from child "+c);
}
function callchild() {
var iframeWin = frames['iFrame'];
iframeWin.func();
}
</script>
</head>
<body>
<iframe id='iFrame' name='iFrame'></iframe>
<br /><br />
<input type='button' onclick='initchild()' value='Init Child'>
<br /><br />
<input type='button' onclick='callchild()' value='Call Child'>
</body>
</html>
I try the same html in IE (version 6.0.2600.0000.xpclient.010817-1148), everything works fine.
Reproducible: Always
Steps to Reproduce:
1. copy the test html text to a file
2. load the file to Firefox
3. click the 'Init Child' button twice
4. click the 'Back' button once
5. open the 'Javascript Console' from the 'Tools' menu
6. click on the 'Call Child' button, the console should show 'uncaught exception: Permisson denied to get property Window.func'
7. click on the 'Call Parent1' button, the console should show 'uncaught exception: Permisson denied to get property Window.func' again.
Comment 2•20 years ago
|
||
*** Bug 341841 has been marked as a duplicate of this bug. ***
Comment 3•19 years ago
|
||
Hi!
I am developping a super advanced forum system and run into a firefox bug. Firefox isn't able to use the iframe object when it is moved more then once (the first time it does work!) or when created as new! (document.createElement)
I've spend almost 12 hours in a row today to get this bug fixed and it simply doesn't seem possible because of this Firefox bug.
This is the site on wich I am testing: www.dwergpapegaai.com
You can post a message, and then try to reply to the message you posted (message is implemented via AJAX). It won't work, in IE all possible solutions work fine!
My javascript is here: http://www.dwergpapegaai.com/functions.js
So to be short:
document.frames['framename'] DOES NOT work anymore when it's object (the frame) has been moved or "deleted and rebuild" more then 1 time (the first time it does work!!!!).
Please help!
Best Regards,
Jan Jaap Hakvoort
Comment 4•19 years ago
|
||
Hi!
I am developping a super advanced forum system and run into a firefox bug. Firefox isn't able to use the iframe object when it is moved more then once (the first time it does work!) or when created as new! (document.createElement)
I've spend almost 12 hours in a row today to get this bug fixed and it simply doesn't seem possible because of this Firefox bug.
This is the site on wich I am testing: www.dwergpapegaai.com
You can post a message, and then try to reply to the message you posted (message is implemented via AJAX). It won't work, in IE all possible solutions work fine!
My javascript is here: http://www.dwergpapegaai.com/functions.js
So to be short:
document.frames['framename'] DOES NOT work anymore when it's object (the frame) has been moved or "deleted and rebuild" more then 1 time (the first time it does work!!!!).
Please help!
Best Regards,
Jan Jaap Hakvoort
Comment 5•19 years ago
|
||
Reporter, do you still see this problem with the latest Firefox 2? If not, can you please close this bug as WORKSFORME. Thanks!
Whiteboard: CLOSEME 07/09
Version: unspecified → 1.5.0.x Branch
Just tried the simple html sample. The problem has gone. So I consider it fixed.
Thank Firefox team for fixing the bug.
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Updated•15 years ago
|
Resolution: FIXED → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•