2013-02-04 15 views
1

必須在下一個場景(我不能改變)在ASP經典頁後等待:在ASP經典窗口強制VBScript代碼調用一個ASP.NET頁面

VBScriptCode ....

var w 
w=window.open(...) 

VBScriptCode ....

在window.open中我調用了一個ASP.NET窗口。我想要做的是在javascript塊後強制VBScriptCode,等待並且不執行,直到ASP.NET窗口刪除一個文件(因爲實際上ASP.NET窗口在VBScriptCode的第二個塊之後開始執行)。我已經試了下兩兩件事:

1)

while oFsoLocal.FileExists(filaAddress)  
wend 

2)

file_exist=True 
while file_exist 
    setTimeOut(file_exist=oFsoLocal.FileExists(fileAddress),1000) 
wend 

但沒有成功。

+0

是VBScript代碼服務器端的JavaScript客戶端打開? – 2013-02-04 13:19:21

回答

0

假設服務器端代碼在這裏,如果你有MSSQL的訪問,此函數假設你已經有了DB與my_conn

Function waitfor(sleep) ' if you need more than 59 seconds, you will need to adjust the SQL 
    sql = "WAITFOR DELAY '00:00:" & right(clng(sleep),2) & "'" 
    my_conn.Execute sql,,129 
End function