我已經構建了一個應用程序,其中客戶端腳本與JS & jQuery和服務器端函數是由基於Java的應用程序。在我的系統中,網頁在所有瀏覽器中的作用就像一個魅力,但是,當我將它部署在具有相同IE版本的不同系統上時,我會看到奇怪的加載效果。在IE9中加載jQuery
比如,
直到接收到響應AJAX調用在加載圖像犯規得到顯示「活着」。這被卡住了,gif在它的過程中變成了jpeg; ajax resposne被添加到同一頁面底部的窗體中,在一個新的div中,IE9,FF20,CHR27在我的系統中按預期工作。這不適用於只安裝IE並且無法承擔其他瀏覽器的其他系統;
我曾嘗試重置瀏覽器設置,但沒有運氣。我也試着用IE9中的開發工具做一些事情,[不知道它到底是什麼,或許與調試有關!]之後,它僅以該會話的預期形式顯示結果。
有人能幫我理解我應該在新系統的瀏覽器上做什麼改變,以使其正常工作?
謝謝
編輯:
好了,因爲這段代碼在同一個版本的IE工作在一個系統上,我希望有可能與代碼中的問題。但這裏是一段代碼,執行上面敘述的任務:
$(".button").click(function() {
$('#checkmark').hide();
var selectionModule = $("#currentSelectedValue").text();
var channelName;
var dataString = 'selection='+ selectionModule;
if(selectionModule == 'About the APP!')
{
$('#result_area').empty();
$('#result_area').css('marginLeft', '250px');
$('#result_area').css('marginRight', '250px');
$('#result_area').load('read-me.html');
}
else if((selectionModule == 'Deployed Channels List') || (selectionModule == 'System pFlows'))
{
$('#result_area').empty();
$('#result_area').css('marginLeft', '0px');
$('#result_area').css('marginRight', '0px');
channelName = 'NA';
dataString += '&channelName=' + channelName;
console.log(dataString);
$.ajax({
type: "POST",
url: "http://localhost:9123/",
data: dataString,
beforeSend : function(){
$('#checkmark1').show(); },
success: function(result) {
$('#result_area').html("<div id='message' style='display: table;'></div>");
$('#message').html("<h2>"+selectionModule+":</h2>")
$('#message').append("<p>"+result+"</p>")
.hide()
.fadeIn(1500, function() {
$('#checkmark1').hide();
$('#checkmark').show();
});
}
});
}
else if(selectionModule != 'Deployed Channels List')
{
$('#result_area').empty();
$('#result_area').css('marginLeft', '0px');
$('#result_area').css('marginRight', '0px');
channelName = $("#cntext").val();
dataString += '&channelName=' + channelName;
//console.log(dataString);
$.ajax({
type: "POST",
url: "http://localhost:9123/",
data: dataString,
beforeSend : function(){
$('#checkmark1').show(); },
success: function(result) {
$('#result_area').html("<div id='message' style='display: table;'></div>");
$('#message').html("<h2>"+selectionModule+" for Channel "+channelName+":</h2>")
$('#message').append("<p>"+result+"</p>")
.hide()
.fadeIn(1500, function() {
$('#checkmark1').hide();
$('#checkmark').show();
});
}
});
}
return false;
});
在第45行添加分號。傻傻的回答?當然,但是由於你沒有顯示任何代碼,它和任何代碼一樣好。現在添加 – Barmar
代碼。 – Srii
即使代碼沒有問題,我們也需要查看它以瞭解可能遇到的瀏覽器問題。但我不確定瀏覽器如何將GIF變成JPEG。 – Barmar