gecko-dev/xpfe/browser/samples/collapsing.xul

48 строки
1.5 KiB
Plaintext
Исходник Обычный вид История

1999-09-03 13:29:56 +04:00
<?xml version="1.0"?>
<?xml-stylesheet href="collapsing.css" type="text/css"?>
<window xmlns:html="http://www.w3.org/1999/xhtml"
1999-09-03 13:29:56 +04:00
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
orient="horizontal"
1999-09-03 13:29:56 +04:00
onload="onWindowLoad()">
<script>
1999-09-03 13:29:56 +04:00
function onWindowLoad() {
verifyControls();
}
function verifyControls() {
var siteOne = window.frames["SiteOne"];
var siteTwo = window.frames["SiteTwo"];
if(siteOne==null)
window.alert("Our SiteOne Frame isn't in the DOM!");
if(siteTwo == null)
window.alert("Our SiteTwo Frame isn't in the DOM!");
1999-09-03 13:29:56 +04:00
}
function cmdHideSiteOne(){
1999-09-03 13:29:56 +04:00
verifyControls();
window.document.getElementById("ShowSite").setAttribute("sitemode", "hideSiteOne");
1999-09-03 13:29:56 +04:00
verifyControls();
}
function cmdHideSiteTwo() {
1999-09-03 13:29:56 +04:00
verifyControls();
window.document.getElementById("ShowSite").setAttribute("sitemode", "hideSiteTwo");
1999-09-03 13:29:56 +04:00
verifyControls();
}
</script>
1999-09-03 13:29:56 +04:00
<broadcaster id="ShowSite" sitemode="hideSiteTwo" />
1999-09-03 13:29:56 +04:00
<observes element="ShowSite" attribute="sitemode" />
<vbox id="SiteOneBox" flex="1">
<html:iframe flex="1" name="SiteOne" src="http://www.mozilla.org/xpfe/xptoolkit"/>
<html:input type="BUTTON" value="Show Boxes Documentation" onclick="cmdHideSiteOne()"/>
</vbox>
<vbox id="SiteTwoBox" flex="1">
<html:iframe flex="1" name="SiteTwo" src="http://www.mozilla.org/xpfe/xptoolkit/boxes.html"/>
<html:input type="BUTTON" value="Show XPFE Documentation" onclick="cmdHideSiteTwo()"/>
</vbox>
1999-09-03 13:29:56 +04:00
</window>