04/08/31 22:18
>>822
openDialogは4番目以降の引数に任意のものを渡せます。
オブジェクトを渡せば処理結果を得ることもできます。
//a.xul
var obj = {};
window.openDialog('b.xul', '_blank', 'chrome,dialog,modal', obj);
alert(obj.result);
//b.xul
<dialog onaccept="window.arguments[0].result = document.getElemenntById('input').value; window.close()">
<textbox id="input"/>
</dialog>
モーダルダイアログにしないと処理結果を返す前にa.xulの処理が先に進んでしまうので注意。