IE在jQuery加載函數中有動態url的diffculty。jQuery .load()函數+ IE +動態URL =脫髮
這裏是我的代碼片段:
var formValues = $('#testing').serialize();
var URL = "test.cfm?" + formValues;
var dialogOpts = {
modal: true,
bgiframe: true,
autoOpen: true,
height: 500,
width: 500,
draggable: true,
resizable: false,
closeOnEscape: false,
open: function() {
//display correct dialog content
$("#dialogContainer").load(URL}
};
$("#dialogContainer").dialog(dialogOpts);
現在介意你,如果我改變的URL靜態的東西,如 「thisHTMLfile.html」,這將完美的工作中FF和IE。但由於URL是動態的IE barfs。我得到一個空白的對話框。就好像IE不會執行ajax調用一樣。
我試過把一個隨機值放在字符串中的想法,使它成爲一個唯一的URL,以便IE不會緩存URL,沒有骰子。
我也檢查了test2.cfm文件的任何HTML錯誤。這裏沒有問題。
有沒有人遇到過這個?
謝謝!