I am using the simple modal and Ajax. When I try to read the content from Ajax it works fine in Chrome. There is a problem in Internet Explorer 7 and Firefox 3.
What am I doing wrong?
My code:
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
I am able to read the data in file my.php, but all the content is hidden when it is showing modal in Internet Explorer 7 and Firefox 3. Chrome shows the Ajax data correctly.
It may work if you change
to