问题标签 [bootbox]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
4 回答
52845 浏览

jquery - Bootbox 确认对话框问题

不幸的是,文档 Bootbox(http://paynedigital.com/2011/11/bootbox-js-alert-confirm-dialogs-for-twitter-bootstrap)没有教如何调用确认对话框。因为它在页面加载时总是出现在文档窗口中,所以当通过单击删除按钮调用时应该出现错误。这是尝试失败的代码。

如何设置此引导框仅在单击删除按钮时出现?谢谢!

编辑 - 解决方案:

现在,当我单击“是”时,删除工作。我要求插件的开发人员将完整的示例放在文档中,这样用户就不需要创建关于如何在单击“是”时删除对象的帖子。问候。

0 投票
1 回答
4783 浏览

php - Bootbox.js 提交表单前确认选择

您好,我决定使用 Bootbox.js 作为一种简单的方法来合并引导模式,以便我可以让用户在发布表单并进行更改之前确认他们的选择。

我在我的默认布局文件中使用 Laravel、jQuery、Bootstrap 和 Bootbox.js:

布局.blade.php

用户页面:

我不知道如何让模态出现之前并阻止提交。但只有在用户确认他们的选择后才发布?

0 投票
1 回答
3259 浏览

javascript - Bootbox - 警报中心文本

我正在使用 Bootbox 为我的 Web 应用程序创建一个看起来更漂亮的警报对话框。是否可以将警报对话框上的文本居中对齐?

0 投票
0 回答
2419 浏览

javascript - Twitter Bootstrap 的 BootBox JS - 如何将数据传递给回调函数?

JS/JQuery 新手在这里。我正在将 BootBox 用于 Twitter Bootstrap,并且我正在尝试将 a 元素的 id 属性的值传递给回调函数:

似乎我不能在回调函数中使用 $(this) ,因为在那里它不是指 a 元素而是指窗口,而且我不知道如何将变量从外部传递给回调。

也许我正在以完全错误的方式思考它。

任何建议都非常感谢!

0 投票
1 回答
413 浏览

typescript - 打字稿中的引导箱编译错误

当我导入 bootbox.d.ts (https://github.com/borisyankov/DefinitelyTyped/blob/master/bootbox/bootbox.d.ts)作为打字稿参考时,我收到以下错误:

提供的参数与调用目标的任何签名都不匹配:Type '{ label: string; }' 缺少“BootboxHandler”类型的属性“类”

这是 bootbox.d.ts 文件中引发错误的代码

0 投票
1 回答
8395 浏览

javascript - Bootbox callback not working properly

I'm trying to use this:

But when the button is clicked:

Alert is shown first and only after that bootbox shows confirm dialog.

I want to return the response , but if i do it from within call back it doesn't work because it returns response from callback but not $('#devicedelete').live('click',function(){});

Btw i'm trying to submit a form basing on response. So if i return 'true' form will be submitted, else if it returns 'false', form wont be submitted.

Please check this: http://pastebin.com/9H3mxE9Y

I have one big table with checkboxes for each row, users select checkboxes and click on any of the buttons 'delete' , 'copy' etc and form should be submitted.

Thanks

0 投票
8 回答
43043 浏览

javascript - Bootbox 中的多个输入

如何在 Bootstrap 的 Bootbox 中有 2 个输入而不是只有一个?

我需要在模式对话框中接收 2 个值。

0 投票
2 回答
13485 浏览

javascript - 转换为 Bootbox 确认

当按下删除用户链接时,以下代码会弹出一个确认窗口:

在这种情况下,当按下 OK 按钮时,链接 delete_user.php?id=123 将被执行。当按下取消按钮时,什么都不会发生。

我想用 Bootbox 做同样的事情。

在 if(result) 和 else 语句下做什么?

0 投票
2 回答
3247 浏览

javascript - $(this).attr("href") 返回未定义

我正在尝试将 bootbox 与 Twitter Bootsrap一起使用。

在下面的代码中,当我使用this.attr('href');并得到TypeError: this.attr is not a function.

当我更改为$(this).attr('href');我得到Undefined.

任何想法?

0 投票
8 回答
45021 浏览

twitter-bootstrap - Bootstrap 和 bootbox:动态改变确认窗口的宽度

我正在将 Bootstrap 用于 Web 应用程序,并使用 bootbox ( http://bootboxjs.com ) 在继续删除操作之前显示一个窗口。

对于不同的删除选项,我需要显示不同的消息。我想显示不同宽度的确认窗口。

如何在 javascript 代码中动态执行此操作?我查看了所有内容,但无法找到解决方案。

感谢您的任何想法和建议!

干杯。