0
請轉至here以查看基於iframe的網絡應用程序。 點擊澳大利亞地圖,選擇一個城市,然後購買一些門票。 現在您會看到位於右下角的購物車表單。 問題出在IE8中,我無法從表中刪除已檢查的行; ,而在其他瀏覽器中,例如FireFox3.6,Opera10,Safari4和Chrome4,此 操作沒問題。使用動態表單動作時出現IE8錯誤
以下是相關的javascript。它不使用jQuery,作爲要求的一部分 是沒有框架允許的!而且內聯框架是我最好的選擇,阿賈克斯只會在這個限制下殺死我。
/* cartForm.js */
function toDeleteRoutes() //this function is executed before form is to be submitted.
{
if(document.getElementsByClassName('delete_box').length > 0) //there're rows to delete
{
document.getElementById('cartForm').action ="./deleteRoutes.php";
document.getElementById('cartForm').target ="section4";
return true; //this enables the form to be submitted as usual.
}
else return false; //there is no more row in table to delete!
}
function toSendEmail() //this function is executed before form is to be submitted.
{
document.getElementById('cartForm').action ="./sendEmail.php";
document.getElementById('cartForm').target ="section3";
document.getElementById('delete_btn').disabled = true; //disable delete button now
return true; //this enables the form to be submitted as usual.
}
function toCancelPurchase()
{
document.getElementById('cartForm').action ="./cancelPurchase.php";
document.getElementById('cartForm').target ="section4";
return true; //this enables the form to be submitted as usual.
}
我不知道哪個部分是錯的,或者這只是因爲IE8的螺絲釘?
感謝這個提示! – user330711 2010-05-02 08:09:32