WordPress의 Thickbox 내에서 HTML 마크 업을 포함한 PHP 파일을 열려고합니다.Thickbox는 jQuery.get()을 통해 가져온 파일의 내용을 표시하지 않습니다.
지금까지 Thickbox를 열어 볼 수있었습니다. PHP 파일의 URL도 정확하지만 내용은 두꺼운 상자에로드되지 않습니다.
$('.add').click(function() {
$('html').addClass('image_spe');
num = $(this).attr('data-num');
formfield = $('.id_img[data-num="'+num+'"]').attr('name');
var id=$("#post_ID").val();
jQuery.get(dialog_url, function(){ /* here, dialog_url is the URL to the PHP file*/
var f = jQuery(window).width();
b = jQuery(window).height();
f = 920 < f ? 920 : f;
f -= 80;
l = f/2;
b -= 84;
tb_show('Add', "#TB_inline?post_id="+id+"&width=" + f + "&height=" + b + "&inlineId=my-dialog");
jQuery("#TB_window").css({'width':920, 'margin-left':-l});
});
return false;
});
PHP 코드가 여기에 있습니다 : :
<?php
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
</head>
<body>
<div id="my-dialog">
<p>TESTING... YOU SHOULD BE ABLE TO SEE THIS IN THICKBOX</p>
</div>
</body>
</html>
<?php ?>
Thickbox와 어떤 문제없이 열리고 파일의 URL이 정확
여기 내 코드입니다 : 여기 내 코드입니다. 그러나 내용은 표시되지 않습니다.
어떻게하면됩니까?
매력처럼 일했습니다! 감사 :) – user48846