home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2005 December
/
PCWorld_2005-12_cd.bin
/
komunikace
/
netscape
/
nsb-install-8-0.exe
/
chrome
/
browser.jar
/
content
/
browser
/
spuiDialog.xul
< prev
next >
Wrap
Extensible Markup Language
|
2005-09-26
|
2KB
|
61 lines
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/skin/spui.css" type="text/css"?>
<dialog id="spui-dialog"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
title="SPUI Dialog"
onload="loadDialog();"
ondialogaccept="return doOK();"
ondialogcancel="return doCancel();">
<script type="application/x-javascript" src="chrome://browser/content/spui.js"/>
<script type="application/x-javascript"><![CDATA[
var contentOpener;
function loadDialog() {
var args = window.arguments[0];
contentOpener = args.opener;
document.getElementById('spuidialog-iframe').setAttribute('src', args.contentURL);
document.getElementById('spui-dialog').setAttribute('title', args.title);
setTimeout("establishRemoteSPUILink('spuidialog');", 100);
setTimeout("establishOpener();", 50);
}
function establishOpener(accumulator) {
if (!accumulator) accumulator = 0;
if (accumulator > 10000) return;
var wait = 0;
var iframe = document.getElementById('spuidialog-iframe');
if (!iframe.contentWindow) {
wait = 100;
accumulator += wait;
setTimeout("establishOpener("+accumulator+");", wait);
return;
}
iframe.contentWindow.opener = contentOpener;
}
function doOK() {
var iframe = document.getElementById('spuidialog-iframe');
if ('doOK' in iframe.contentWindow) {
iframe.contentWindow.doOK();
}
try {
window.close();
} catch (ex) { }
}
function doCancel() {
var iframe = document.getElementById('spuidialog-iframe');
if ('doCancel' in iframe.contentWindow) {
iframe.contentWindow.doCancel();
}
try {
window.close();
} catch (ex) { }
}
]]></script>
<iframe id="spuidialog-iframe" src="about:blank" flex="1"/>
</dialog>