I am developing a firefox addon,
in my settings page dialog.xul
i have an iframe where i load different settings pages page1.xul
page2.xul
page3.xul
Iframe :
<vbox flex="1">
<iframe
id="iframe"
src="chrome://xxx/content/page1.xul"
flex="1"></iframe>
</vbox>
Within the iframe i need to navigate from page2.xul
to page3.xul
with the code in page2.xul
My code (page2.xul) :
gBrowser.loadURI("chrome://xxx/content/page3.xul");
Also tried
document.getElementById("iframe").setAttribute("src", "chrome://xxx/content/page3.xul");
but it's not working i know iframe container is not accessible from the iframe but how can i do that redirection ?
With iframe in XUL you must create it with the HTML namespace otherwise things like load events don't work right, see this topic: http://forums.mozillazine.org/viewtopic.php?f=19&t=2809781&hilit=+iframe
Once you do that, changing src etc should work as expected.