问题标签 [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 投票
2 回答
6696 浏览

javascript - Bootbox,两个模态窗口 - 一个在另一个之上

我有两个引导箱模式窗口 - 父级和子级。如果用户输入了错误的数据并尝试保存父模式窗口,则会出现子窗口。问题是 - 当子窗口出现时,仍然可以单击父模式窗口按钮。我该如何解决?当子模式打开时,必须禁用父窗口控件。

非常感谢,

迈克尔

0 投票
1 回答
5984 浏览

javascript - 引导弹出窗口(引导箱)中的 Javascript 事件不起作用

我正在尝试使用引导框模式创建引导弹出窗口,表单内部有一个带有屏蔽输入的输入文本,但弹出窗口内的任何事件都不起作用。

见这里:http: //jsfiddle.net/ens1z/UK6x5/5/

的HTML:

JavaScript:

如何在弹出窗口中屏蔽作品?

0 投票
1 回答
833 浏览

javascript - 如何在 BootBox 中删除自动对焦

在 Ubuntu 上使用 Bootstrap 2.3Bootbox并在 Google Chrome 中查看结果时,按钮周围的边框不太吸引人,因为它是自动对焦的。一旦显示模式,我还没有找到任何 api 挂钩来触发模糊事件。有没有办法单独使用 javascript 或仅使用 css 删除自动对焦,但没有分叉项目的选项,删除自动对焦并使其可配置?

引导箱自动对焦

0 投票
0 回答
822 浏览

javascript - 使用 Ajax 提交表单 Bootbox

我正在使用 php、bootbox 和 ajax 开发聊天来提交表单,对,但我不能用 ajax 提交表单!

好吧,我需要将表单提交到下一页dateRecd.php插入日期并使用两个参数调用这个聊天函数 chatWith(id,name),即开始聊天,Id 和 Name,它们是在 mySQL 中获取的数据!

我不知道哪里错了,我第一次使用 bootbox

0 投票
0 回答
114 浏览

javascript - javascript 和 bootbox - 失去 sincronicity

我一直在阅读 javascript 是单线程的,在某些特殊情况下也可以是异步的。不知何故,我有一段代码我不明白为什么会有这种行为,似乎与这种罪孽深重的想法相矛盾。

我有一个按钮,当它被点击时,我想打开一个确认对话框,如果没问题,我会在之后执行表单的 $.post() 。这是我在按钮的 onclick 事件中使用的函数:

有人能告诉我为什么总是在“第一”之前打印“第二”吗?在bootbox.confirm之前调用它,然后在 main 函数的其余部分调用它不应该是合乎逻辑的吗?谢谢。

0 投票
1 回答
13641 浏览

ajax - 如何将 ajax 数据设置到 Bootbox 对话框?

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

此代码不起作用

0 投票
1 回答
2685 浏览

javascript - bootbox confirm not working properly

In my case when I click on button confirm-box is called but at the same time server side code executes without confirmation. My code is

0 投票
2 回答
2052 浏览

javascript - e.preventDefault() not working when used with bootbox and jQuery.post()

What i'm trying to achieve?

I have a div that is controlled by JS that has its height changed when a menu item is clicked. So when a menu item is clicked a div appears, when it is clicked again it disappears.

Within this div i have a form, when the form is submitted a message will display asking the user if they are sure they want to submit form. If they answer yes, the form submits and an email is sent.

If the user says no the message will disappear allowing the user to make changes.

Problem

When a form is submitted the page refreshes due to the post. Thus making the div disappear.

My solution?

When the user says yes the form is posted using a jQuery.post() along with a e.preventDefault().

This should then

  1. Stop the form from refreshing (thus the div with the form is open still)
  2. Post the form data

Code

What is happening?

The form is still posting causing a refresh when the user says "yes" to the message.

0 投票
3 回答
6117 浏览

javascript - Bootbox.prompt() 将焦点设置在文本字段上

我似乎无法自动将焦点设置在 Bootbox 的文本字段上。

这是我的代码:函数 setCode(myCode){

也许有关 bootbox 的代码的某些东西妨碍了?

0 投票
2 回答
1171 浏览

typescript - TypeScript 中的 bootbox.dialog 编译错误

我正在尝试Bootbox使用bootbox.d.ts. 它无法编译。

错误:

错误 49 提供的参数与调用目标的任何签名都不匹配:无法将类型“字符串”应用于类型为“{消息:字符串”的参数 1;按钮:{取消:{标签:字符串;类名:字符串;}; 确认删除:{标签:字符串;类名:字符串;回调: () => 无效;}; }; }'。

bootbox.d.ts:

如何修改定义以接受带有我正在使用的参数的对话框?