私はクライアント用のsmalle Webアプリケーションを持っていません。 Firefox、Chrome、IE7、IE8、IE9でテストしました。JqueryダイアログIE9のコンテンツがhtmlを使用して表示されない
今は失敗することはありません。私がテストしたすべてのブラウザ/バージョンで動作します。私のクライアントが何を構えているのかはっきりしないが、IE9だと言った。
コードはこれです:
function noticeBox(type, html, title) {
switch(type) {
case 1:
$('#notice_box').dialog({
title: title,
width: 400,
modal: true,
position: 'center',
buttons: {
'Ok': function() {
$(this).dialog('close');
}
}
});
break;
case 2:
$('#notice_box').dialog({
title: title,
width: 800,
modal: true,
position: 'center',
buttons: {
'Bekræft og bestil': function() {
$('#form_products').submit();
},
'Annuller': function() {
$(this).dialog('close');
}
}
});
break;
case 3:
$('#notice_box').dialog({
title: title,
width: 400,
modal: true,
position: 'center',
buttons: {
'Luk': function() {
$(this).dialog('close');
}
}
});
break;
}
alert(html);
$('#notice_box').html(html);
$('#notice_box').dialog('open'); }
ない非常に汎用的な機能が、現時点では失敗している厥。彼は、ダイアログポップのダイアログにはコンテンツがないと言っています。彼はボタンを見ることができますが、ダイアログ自体にHTMLはありません。
アイデア?
更新:Btw彼はいくつかのダイアログをアクティブにすることができ、結果はすべて同じです。内容のないダイアログ。
UPDATE2:この機能を使用する例はこれです。
function order() {
var procuct_str = '';
var found_order = false;
$.each($('.order_input'), function(){
var product_id = $(this).attr('id').split('-');
if(parseInt($(this).val()) > 0) {
found_order = true;
procuct_str = procuct_str+'<div class="float_left"><span class="bread_text">'+$('#description-'+product_id[1]).text()+'</span></div><div class="float_right"><span class="bread_text">'+$(this).val()+'</span></div><div class="clear"></div>';
}
});
if(found_order == true) {
procuct_str = '<div class="float_left"><b>Beskrivelse</b></div><div class="float_right"><b>Antal kasser</b></div><div class="clear"></div>'+procuct_str;
noticeBox(2, procuct_str, 'Bekræftelse');
var found_order = false;
} }
function関数noticeBox(type、html、title){htmlを関数の$( '#notice_box')の一番下に置いてください。 –