我正在使用带有angularJS和angularstrap的jquery完整日历.似乎问题是只有当我点击日历中的一个按钮或调整浏览器窗口大小时才会显示日历.此日历正在使用angularstrap初始化的模式框中加载.
我很感激帮助.
Plunkr:LINK
模态HTML位于search_modal.html中.日历控制器是:calendarCtrl.js父控制器是search.js
编辑:经历了谷歌地图和我试图实现的画廊相同的问题后,我不认为这是一个与日历直接相关的问题,而是与模式框本身更相关.任何交互式和涉及javascript的东西都不能根据模态框的大小正确缩放.任何人都有任何想法如何解决这个问题?
fullcalendar twitter-bootstrap angularjs angular-ui bootstrap-modal
我正在开发一个MVC 5 Web应用程序.在我的一个Razor Views中,我有一个表格可以输出几行数据.在每行数据旁边是一个删除按钮.当用户单击删除按钮时,我想要弹出Bootstrap模式,并要求用户确认删除.
@foreach (var item in Model.Data) {
<tr>
<td>...</td>
<td>@Html.ActionLink("Delete", "Delete", new { id = item.ID }, new { @class = "btn btn-danger btn-xs", data_toggle = "modal", data_target = "#myModal" })</td>
</tr>
}
Run Code Online (Sandbox Code Playgroud)
实际上,当用户单击"删除"按钮时,Modal弹出正常,但我似乎无法获取Actionlink参数中的ID以传递到我的模态中的"确认"按钮,以便它随后将被发送到删除我的控制器中的动作.
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title" id="myModalLabel">Delete Nomination</h4>
</div>
<div class="modal-body">
Are you sure you wish to delete this nomination?
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button> …Run Code Online (Sandbox Code Playgroud) 是否有可能在引导3,以从另一个模式打开模式?我有模态窗口,内容从外部html文件加载.
据我所知,你不能同时拥有两个模态窗口,所以我必须关闭第一个模态,然后打开第二个模态.问题是我在单击第一个模态中的提交按钮后必须执行此操作.
我试图在提交按钮上使用data-dismiss="modal"with data-toggle="modal"属性,但它们只隐藏第一个模态,背景仍然很暗,没有任何反应.
javascript jquery modal-dialog twitter-bootstrap bootstrap-modal
我很难在一段时间后自动关闭Bootstrap模态.
这是我用来在4秒内关闭模态的js代码:
setTimeout(function() { $('#myModal').modal('hide'); }, 4000);
两个基本问题:
(A)当加载html页面(包含模态)时,模态Timeout似乎在模态甚至显示之前运行.单击页面中的链接后,将设置模式.如果在页面加载时没有立即单击链接,则模式将仅短暂出现然后立即关闭,因为基本上超时时间是在加载html页面时开始的,而不是在显示模式时.
(B)如果用户点击链接以第二次(或第3次,第4次等)启动模态,则模态显示正确,但在该时间段后不会关闭.它只是保持打开状态,直到用户手动关闭它.
所以......这两个问题是:
(1)在运行时钟之前,如何让模态超时周期等到显示模态.
(2)如何使模式在第二次和第三次显示时仍有正常的Timeout功能?
(下面这个链接提出的答案看起来很有希望,但对我不起作用.也许它们不适用于Bootstrap 3?如何在一分钟后自动关闭bootstrap模式对话框)
下面的代码看起来非常有前景,但即使将'shown'更改为'shown.bs.modal'后也无效.或者我可能将此代码放在错误的位置?
var myModal = $('#myModal').on('shown', function () {
clearTimeout(myModal.data('hideInteval'))
var id = setTimeout(function(){
myModal.modal('hide');
});
myModal.data('hideInteval', id);
})
Run Code Online (Sandbox Code Playgroud)
非常感谢任何建议!
我有一个代码,它检查数组中是否已存在一个值.基本上,程序所做的是它首先将所有值存储在数组中.然后使用count(array_keys)函数检查它.有三个输入.如果在这3个输入中,值出现两次或三次,则会发出错误.现在,我的问题是,如果输入A和输入B是相同但输入C是不同的,它仍将添加到数据库,但如果输入A和C是相同但输入B不同然后它将不添加(其中是正确的).
这是我的PHP代码:
<?php
include 'config.php';
if(isset($_POST['update_actual_lupong'])){
$id = isset($_GET['id'])? $_GET['id'] : "";
$id_hearing = $_POST['hearing_lup'];
$lupong = $_POST['act_lupong'];
$actual = array();
foreach($lupong as $aaa) {
$actual[] = $aaa;
}
if ((count(array_keys($actual, $aaa)) > 1)) {
echo '<br><br>this array contains DUPLICATE <br><br>';
}
else {
foreach ($lupong as $lup) {
$updateMemo = mysqli_query($conn, "INSERT INTO actuallupong(Hearing_idHearing, bar_pos2) VALUES ('$id_hearing', (SELECT idtable_position FROM table_position WHERE Person_idPerson = '$lup'));");
}
echo "ADDED ggg";
}
//header ('location: view_case_profile.php?id='.$id);
mysqli_close($conn);
}
?>
Run Code Online (Sandbox Code Playgroud)
HTML代码(它是一个模态): …
我在我的项目中使用了bootstrap的模式弹出窗口,并希望得到以下内容:
我尝试使Bootstrap Modal框工作并使其响应,并阅读此问题:Bootstrap Modal Dialog.网格系统可以在模态上下文中使用吗?
然而,该页面在谷歌浏览器中运行良好,并且在谷歌浏览器模拟的 iPhone 5,6或6 Plus中运行良好(注意:在开发人员工具中模拟) - 但不适用于真正的iPhone 6 Plus或iPad(在肖像模式).(文字显得非常庞大).
有没有办法让它发挥作用?
代码:
<div class="modal-body">
<div class="container col-md-12">
<div class="row">
<p class="col-md-4">
1 Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap …Run Code Online (Sandbox Code Playgroud) 我有这个来自Bootstrap的Modal当我添加按钮时要调用它它已成功打开,但我真正需要的是从函数调用中自动打开这个模态我的实验是:
<button id="RenewCollerctorDateID" class="btn btn-success" style="width: 10%; display: inline;
padding-right: 10px; float: left;" onclick="RenewCollectorDatePeriod();">renew</button>
Run Code Online (Sandbox Code Playgroud)
我的JavaScript是
function RenewCollectorDatePeriod() {
// AreYOuSureRenew();
var EmpID = $("#<%=ddlFilterCollector.ClientID%>").val();
if (EmpID == -1) {
alert("please select one ")
}
else {
alert(EmpID);
GetCollectorInfo(EmpID);
}
}
Run Code Online (Sandbox Code Playgroud)
然后:
function GetCollectorInfo(EmpID) {
// AreYOuSureRenew();
$.ajax({
type: "POST",
url: "UnloadingCalendar.aspx/GetCollectorInfo",
data: JSON.stringify({ EmpID: EmpID }),
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (result) {
alert(result.d);
AreYOuSureRenew();
},
error: function (msg) {
alert(msg.d);
},
complete: function () {
}
}) …Run Code Online (Sandbox Code Playgroud) 在我的HTML中,我在我的一个模态中有这个:
<a href="#" class="clicker" data-dismiss="modal">Click</a>
Run Code Online (Sandbox Code Playgroud)
如果单击此元素,它会隐藏模态.
但是,我希望能够获得在jQuery中关闭模式的元素,如:
$('#myModal').on('hidden.bs.modal', function(event)
{
var invoker = $(event.relatedTarget);
});
Run Code Online (Sandbox Code Playgroud)
但这不起作用.relatedTarget似乎只对工作show.bs.modal和shown.bs.modal(按文档).
那么如何才能获得导致模态在hidden.bs.modal事件中关闭的元素?
javascript jquery twitter-bootstrap bootstrap-modal twitter-bootstrap-3
有谁知道bootstrap模态背景问题?闪烁的背景像素
HTML
<!-- Button trigger modal -->
<button type="button" id="mymodal" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">
Run Code Online (Sandbox Code Playgroud)
启动演示模式
<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title" id="myModalLabel">Modal title</h4>
</div>
<div class="modal-body">
...
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-primary">Save changes</button>
</div>
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
bootstrap-modal ×10
javascript ×4
jquery ×3
css ×2
angular-ui ×1
angularjs ×1
arrays ×1
asp.net-mvc ×1
fullcalendar ×1
html ×1
html5 ×1
modal-dialog ×1
mysql ×1
php ×1