2011-04-21 81 views
0

我有一個Java應用程序(遺產),這使得大量使用框架和彈出窗口。我需要在註銷應用程序時關閉所有彈出窗口。我試圖使用框架對象訪問彈出窗口。當我嘗試查看有多少幀時,我使用frames.length,並且該值始終爲0.可以做什麼?該應用程序變化很大,並使用dhtmlx。JavaScript與框架沒有價值

+0

你能發佈你的javaSCRIPT代碼和一個popup的例子嗎? – reporter 2011-04-21 12:25:03

+0

function win(url,name,width,height){ \t leftPos =(screen.width-width)/ 2; topPos =(screen.height-(height + 110))/ 2; \t popup = window.open(url,name,'width ='+ width +',height ='+ height +',toolbar = 0,location = 0,directories = 0,status = 0,menubar = 0,scrollbars = 0,可調整大小= 0,copyhistoryno,左= '+ leftPos +',頂部='+ topPos); \t } //結束功能 – user718900 2011-04-21 12:36:53

+0

這是用來打開彈出窗口的功能。我正在嘗試獲取這裏創建的'popup'對象。我似乎非常迷失在畫面中。 – user718900 2011-04-21 12:38:16

回答

2

彈出窗口不是框架。訪問它們的唯一方法是通過調用window.open的返回值。

+0

我知道彈出窗口不是框架。 window.open沒有返回值。我認爲它可能會因爲使用框架集來顯示數據而丟失。 – user718900 2011-04-27 11:12:11