I have a frameset ala: <frame> <framset src="t1.html" name="t1"> <framset src="t1.html" name="t2"> </frame> Then in t1.html I do: onclick=parent.t2.focus() then I get: Error: uncaught exception: Permission denied to call method Window.focus t1 and t2 are on the same server... why? and why is it "uncaught" ? build 20020108
It's uncaught because you did not catch it (using a try/catch). The weird thing is that all.js has: pref("capability.policy.default.Window.focus", "allAccess"); So this error should not be occurring...
Gemal, have you unchecked "Allow web pages to... raise or lower windows" in advanced prefs? That might cause this error, since the function for focusing a frame is the same as the function for focusing a window (!).
it was the pref setting. Sorry about that.
Setting a pref to prevent web pages from raising/lowering windows shouldn't break scripts that just try to focus frames. Unfortunately, the function call is the same for both.
Jesse, wouldn't your last comment just make this a duplicate of the "content controls should not stop script execution" bug?
A call to focus() should succeed when it takes place within a framed document. In that case, it shouldn't cause Mozilla to switch windows or tabs, regardless of the security pref. Fixing bug 122866 would make this bug less of a problem but wouldn't take care of it completely.
Changing description to "Use separate security checks for focusing frames/windows."
*** This bug has been marked as a duplicate of 300453 ***