Javascript 无法在Popover、引导中显示Base64映像

Javascript 无法在Popover、引导中显示Base64映像,javascript,jquery,twitter-bootstrap,popover,Javascript,Jquery,Twitter Bootstrap,Popover,情况是,我想在bootstrap popover v2.3.1中打开一个映像 图像是Base64格式的。 单击按钮[id='ImagePopoOverButton'],弹出窗口将打开,但基本64图像不会出现 如果有人能帮我解决同样的问题,我将分享下面的代码片段 <!-- js func, which load Base 64 img format via Ajax --> function showImagePopover() { $.ajax({

情况是,我想在bootstrap popover v2.3.1中打开一个映像 图像是Base64格式的。 单击按钮[id='ImagePopoOverButton'],弹出窗口将打开,但基本64图像不会出现

如果有人能帮我解决同样的问题,我将分享下面的代码片段

<!-- js func, which load Base 64 img format via Ajax -->

function showImagePopover() {
            $.ajax({
                url : getContextPath()
                        + "/app/Application/showImagePopover",
                type : 'POST',
                async : false,
                success : function(jqXHR) {
// In this scope, i have fetched the ajax image, but i am not been able 
//to show that up in popover
                }
            });
        }
/***************************************************************/
<!-- Popover function js, html:true -->

$("#imagePopoverButton").popover({
        content : showImagePopover(),
        html : true,
        trigger : 'click',
        placement : 'right',

    });

/***************************************************************/

<!-- via Clicking of the button, ajax call is suppose to load base64 image in popover -->
<button type="button" class="btn btn-mini btn-primary" id="imagePopoverButton"      rel="popover">imagePopover</button>

函数showImagePopover(){
$.ajax({
url:getContextPath()
+“/app/Application/showImagePopover”,
键入:“POST”,
async:false,
成功:函数(jqXHR){
//在这个范围内,我已经获取了ajax图像,但是我无法
//在popover上展示这一点
}
});
}
/***************************************************************/
$(“#ImagePopoOverButton”).popover({
内容:showImagePopover(),
是的,
触发器:“单击”,
位置:'对',
});
/***************************************************************/
图像覆盖

在注释下方添加以下内容

var image = new Image();
image.src = "data:image/png;base64," + jqXHR;
image.id = "image_id";
image.width = '500';
image.height = '500';
$('#imagePopoverButton').html(image);