Я использую простой модал и Ajax . Когда я пытаюсь прочитать контент из Ajax, он отлично работает в Chrome. Проблема в Internet Explorer 7 и Firefox 3.
Что я делаю не так?
Мой код:
print("code sample");
$(document).ready(function () {
$('#confirma, #confirmDialog a.confirm').click(function (e) {
e.preventDefault();
// Example of calling the confirm function.
// You must use a callback function to perform the "yes" action
alert("OK");
confirm("Hello");
});
});
function confirm(message) {
$('#confirm').modal({
close: false,
position: ["8%",],
overlayId: 'confirmModalOverlay',
containerId: 'confirmModalContainer',
onShow: function (dialog) {
dialog.data.find('.message').append(message);
// If the user clicks "yes"
dialog.data.find('.yes').click(function () {
// Close the dialog
$.modal.close();
$.get("My.php", function (data) {
$('#resp').modal({
close: false,
position: ["8%",],
overlayId: 'confirmRespOverlay',
containerId: 'confirmRespContainer',
onShow: function (second) {
var test = "hello";
second.data.find('.info').append(data);
second.data.find('.yes').click(function () {
alert("Double OK");
});
}//onShow
}); //Resp
});
});//Click
}// Onshow
});//Modal
} //Confirm
Я могу прочитать данные в файле my.php
, но все содержимое скрыто, когда отображается модальное в Internet Explorer 7 и Firefox 3. Chrome корректно отображает данные Ajax.