有人能幫我寫解決showModalDialog問題

06 六月 2015 / By memdb

好多年前寫了套網上會計軟件, 使用了javascript showModalDialog 來取會計帳戶編號, 但新版的Google Chrome不支援這function, 有人能幫我解決嗎? 以下是查看問題的步驟.

可先下載網上會計軟件, 安裝後按[伺服器設定], 預設WEB SERVER PORT是80, 按下[開啟伺服器], 成功應該可以在IE上登入, 編號是admin, 密碼是memdb.

登入後可以看到MENU, 按[傳票管理], 再按[加入傳票], 就能看到下圖:

如在IE按[…], 就能列出傳票讓用戶選擇帳戶, 或在帳戶編號輸入編號1210, 按[…] 就能自動選擇帳戶. 以上功能在IE完成沒問題.

但如在Google Chrome按[…]就不能出那不成功 (因為新版不支援showModalDialog), 它會CALL在安全Folder內voucher.js中以下FUNCION:


function getAccCat(row,type)
{
alert(“START”);
var r;
var w = window.screen.availWidth-50;
var h = window.screen.availHeight-50;
if(inputForm[‘accCode’+row].value==”)
r = showModalDialog(‘?page=selectAccCat&type=’+type, inputForm[‘accName’+row], ‘status=0;resizable=1;scrollbars=1;dialogWidth=’ + w + ‘px;dialogHeight=’ + h +’px;’);
else
r = showModalDialog(‘?page=selectAccCat&accCode=’+inputForm[‘accCode’+row].value, inputForm[‘accName’+row], ‘status=0;resizable=1;scrollbars=1;dialogWidth=’ + w + ‘;dialogHeight=’ + h +’;’);
alert(r);


alert 是我後加的, 如alert(r)能出1210就成功, 不知以上問題有沒有人可以幫我 (當然IE和CHROME都能用), 如需要費用, 可向我提出.


Prev Post:
Next Post:
Category Prev Post:
Category Next Post: