Adding sidebar in a frame. Changing iframe to load a frame page

that loads the sidebar.  Changing targeting window to the content window
in the frame
This commit is contained in:
matt%netscape.com 1999-04-06 00:07:01 +00:00
parent d5dc9c026c
commit cc4c608444

View File

@ -20,7 +20,7 @@
if (appCore != null) {
dump("BrowserAppCore has been created.\n");
appCore.Init("BrowserAppCore");
appCore.setContentWindow(window.frames[0]);
appCore.setContentWindow(window.frames[0].frames[1]);
appCore.setWebShellWindow(window);
appCore.setToolbarWindow(window);
appCore.setDisableCallback("DoDisableButtons();");
@ -50,7 +50,7 @@
function RefreshUrlbar()
{
//Refresh the urlbar bar
document.getElementById('urlbar').value = window.frames[0].location.href;
document.getElementById('urlbar').value = window.frames[0].frames[1].location.href;
}
function BrowserBack()
@ -79,7 +79,7 @@
function BrowserHome()
{
window.frames[0].home();
window.frames[0].frames[1].home();
RefreshUrlbar();
}
@ -96,7 +96,7 @@
return false;
}
window.frames[0].location.href = url;
window.frames[0].frames[1].location.href = url;
RefreshUrlbar();
}
@ -486,7 +486,7 @@
</menu>
<menu name="Bookmarks" onclick="OpenBookmarkURL(event.target)"
datasources="rdf:bookmarks" id="NC:BookmarksRoot" open="true">
<menuitem name="Add Current Page" onclick="BrowserAddBookmark(window.frames[0].location.href,window.frames[0].document.title);"/>
<menuitem name="Add Current Page" onclick="BrowserAddBookmark(window.frames[0].frames[1].location.href,window.frames[0].frames[1].document.title);"/>
<menuitem name="Manage Bookmarks..." onclick="BrowserEditBookmarks();"/>
<separator/>
</menu>
@ -525,42 +525,42 @@
<menuitem name="Software Updates" onclick="BrowserReload();"/>
<menuitem name="Technical Support" onclick="BrowserReload();"/>
<menuitem name="Release Notes"
onclick="window.frames[0].location.href='http://www.mozilla.org/projects/seamonkey/release-notes/index.html'"/>
onclick="window.frames[0].frames[1].location.href='http://www.mozilla.org/projects/seamonkey/release-notes/index.html'"/>
<separator />
<menuitem name="About Communicator Prototype"
onclick="window.frames[0].location.href='http://www.mozilla.org/projects/seamonkey/release-notes/index.html'"/>
onclick="window.frames[0].frames[1].location.href='http://www.mozilla.org/projects/seamonkey/release-notes/index.html'"/>
</menu>
// Menu for testing.
<menu name="Debug">
<menu name="Verification"> // Build verification sites.
<menuitem name="Mozilla" onclick="window.frames[0].location.href='http://www.mozilla.org'"/>
<menuitem name="Yahoo" onclick="window.frames[0].location.href='http://www.yahoo.com'"/>
<menuitem name="Netscape" onclick="window.frames[0].location.href='http://www.netscape.com'"/>
<menuitem name="Mozilla" onclick="window.frames[0].frames[1].location.href='http://www.mozilla.org'"/>
<menuitem name="Yahoo" onclick="window.frames[0].frames[1].location.href='http://www.yahoo.com'"/>
<menuitem name="Netscape" onclick="window.frames[0].frames[1].location.href='http://www.netscape.com'"/>
</menu>
<menu name="Viewer"> // Viewer tests.
<menuitem name="Demo #0" onclick="window.frames[0].location.href='resource:/res/samples/test0.html'"/>
<menuitem name="Demo #1" onclick="window.frames[0].location.href='resource:/res/samples/test1.html'"/>
<menuitem name="Demo #2" onclick="window.frames[0].location.href='resource:/res/samples/test2.html'"/>
<menuitem name="Demo #3" onclick="window.frames[0].location.href='resource:/res/samples/test3.html'"/>
<menuitem name="Demo #4" onclick="window.frames[0].location.href='resource:/res/samples/test4.html'"/>
<menuitem name="Demo #5" onclick="window.frames[0].location.href='resource:/res/samples/test5.html'"/>
<menuitem name="Demo #6" onclick="window.frames[0].location.href='resource:/res/samples/test6.html'"/>
<menuitem name="Demo #7" onclick="window.frames[0].location.href='resource:/res/samples/test7.html'"/>
<menuitem name="Demo #8" onclick="window.frames[0].location.href='resource:/res/samples/test8.html'"/>
<menuitem name="Demo #9" onclick="window.frames[0].location.href='resource:/res/samples/test9.html'"/>
<menuitem name="Demo #10" onclick="window.frames[0].location.href='resource:/res/samples/test10.html'"/>
<menuitem name="Demo #11" onclick="window.frames[0].location.href='resource:/res/samples/test11.html'"/>
<menuitem name="Demo #12" onclick="window.frames[0].location.href='resource:/res/samples/test12.html'"/>
<menuitem name="Demo #13" onclick="window.frames[0].location.href='resource:/res/samples/test13.html'"/>
<menuitem name="Demo #0" onclick="window.frames[0].frames[1].location.href='resource:/res/samples/test0.html'"/>
<menuitem name="Demo #1" onclick="window.frames[0].frames[1].location.href='resource:/res/samples/test1.html'"/>
<menuitem name="Demo #2" onclick="window.frames[0].frames[1].location.href='resource:/res/samples/test2.html'"/>
<menuitem name="Demo #3" onclick="window.frames[0].frames[1].location.href='resource:/res/samples/test3.html'"/>
<menuitem name="Demo #4" onclick="window.frames[0].frames[1].location.href='resource:/res/samples/test4.html'"/>
<menuitem name="Demo #5" onclick="window.frames[0].frames[1].location.href='resource:/res/samples/test5.html'"/>
<menuitem name="Demo #6" onclick="window.frames[0].frames[1].location.href='resource:/res/samples/test6.html'"/>
<menuitem name="Demo #7" onclick="window.frames[0].frames[1].location.href='resource:/res/samples/test7.html'"/>
<menuitem name="Demo #8" onclick="window.frames[0].frames[1].location.href='resource:/res/samples/test8.html'"/>
<menuitem name="Demo #9" onclick="window.frames[0].frames[1].location.href='resource:/res/samples/test9.html'"/>
<menuitem name="Demo #10" onclick="window.frames[0].frames[1].location.href='resource:/res/samples/test10.html'"/>
<menuitem name="Demo #11" onclick="window.frames[0].frames[1].location.href='resource:/res/samples/test11.html'"/>
<menuitem name="Demo #12" onclick="window.frames[0].frames[1].location.href='resource:/res/samples/test12.html'"/>
<menuitem name="Demo #13" onclick="window.frames[0].frames[1].location.href='resource:/res/samples/test13.html'"/>
</menu>
<menu name="XPToolkit"> // XPToolkit tests.
<menuitem name="Toolbar" onclick="window.frames[0].location.href='resource:/res/samples/toolbarTest1.xul'"/>
<menuitem name="Tree" onclick="window.frames[0].location.href='resource:/res/samples/treeTest1.xul'"/>
<menuitem name="Toolbar" onclick="window.frames[0].frames[1].location.href='resource:/res/samples/toolbarTest1.xul'"/>
<menuitem name="Tree" onclick="window.frames[0].frames[1].location.href='resource:/res/samples/treeTest1.xul'"/>
</menu>
</menu>
@ -580,12 +580,12 @@
</titledbutton>
<titledbutton id="reload-button" align="bottom" value="Reload"
onclick="window.frames[0].location.reload()">
onclick="window.frames[0].frames[1].location.reload()">
<observes element="canReload" attribute="disabled"/>
</titledbutton>
<titledbutton id="stop-button" align="bottom" value="Stop"
onclick="window.frames[0].stop()">
onclick="window.frames[0].frames[1].stop()">
<observes element="canStop" attribute="disabled"/>
</titledbutton>
@ -600,7 +600,7 @@
<observes element="canPrint" attribute="disabled"/>
</titledbutton>
<titledbutton id="Throbber" onclick="window.frames[0].home()">
<titledbutton id="Throbber" onclick="window.frames[0].frames[1].home()">
<observes element="Browser:Throbber" attribute="busy"/>
</titledbutton>
</toolbar>
@ -609,13 +609,13 @@
<titledbutton id="home-button" align="right" value="Home"
onclick="BrowserHome()"/>
<titledbutton id="netscape-button" align="right" value="Netscape"
onclick="window.frames[0].location.href='http://my.netscape.com'"/>
onclick="window.frames[0].frames[1].location.href='http://my.netscape.com'"/>
<spring flex="100%"/>
</toolbar>
</toolbox>
<html:iframe id="content-frame" html:name="content" html:src="BrowserInitPage.html" flex="100%" />
<html:iframe id="content-frame" html:name="content" html:src="contentframe.html" flex="100%" />
<html:script>