Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ajax/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何将ajax数据设置为引导对话框?_Ajax_Bootbox - Fatal编程技术网

如何将ajax数据设置为引导对话框?

如何将ajax数据设置为引导对话框?,ajax,bootbox,Ajax,Bootbox,如何将数据从ajax设置为引导对话框?或者我需要使用jqueryui对话框,什么时候需要设置一些数据 此代码无效 bootbox.dialog({ message: data, title: "Custom title", buttons: { success: { label: "Success!", className: "btn-success",

如何将数据从ajax设置为引导对话框?或者我需要使用jqueryui对话框,什么时候需要设置一些数据

此代码无效

bootbox.dialog({
        message: data,
        title: "Custom title",
        buttons: {
        success: {
                label: "Success!",
                className: "btn-success",
            },
        }
    });

请提供更多上下文,并分享您遇到的错误类型。我如何使用消息内循环?@Sulemankhan您不能在
消息内循环,但您可以在
成功
回调中调用
引导框之前循环您的
数据
jQuery.ajax({
    type: 'POST',
    url: $(this).attr('href'),
    success: function(data) {
        bootbox.dialog({
            message: data,
            title: "Custom title",
            buttons: {
                success: {
                    label: "Success!",
                    className: "btn-success",
                },
            }
        });
    }
});