我正在尝试使用dialogClass
属性向我的jQuery对话框添加一个额外的类.这是javascript:
$(function(){
$( "#toogleMAmaximized" ).dialog({
title: 'Missions and Achivments',
autoOpen: false,
height: 500,
width: 700,
modal: true,
dialogClass: 'noPadding',
buttons: {
Cancel: function() {
$( this ).dialog( "close" );
}
},
close: function() {
allFields.val( "" ).removeClass( "ui-state-error" );
}
})
$( "#toogleMAminimized" ).click(function() {
$( "#toogleMAmaximized" ).dialog( "open" );
$( "#toogleMAmaximized" ).dialog({dialogClass:'noPadding'});
});
})
<div id="toogleMAminimized" style="" class="noPadding">
<div class="" style="cursor: pointer;position: absolute;right: 0;top: 45px;"><img src ="images/MAminimized.png" alt="missions and achivments"/></div>
</div>
Run Code Online (Sandbox Code Playgroud)
万一你需要它,我的HTML代码
<div id="toogleMAmaximized" >
<div id="missions"> …
Run Code Online (Sandbox Code Playgroud) 嗨,我一直在尝试对JSP页面进行ajax调用.这是JS函数的一部分.
<script>
$(function(){
function myAjaxCall() {
$.ajax({
type: "post",
url: "jsp/common/myJavascriptPage.jsp",
dataType: "text",
success:
function (result) {
alert("Got the result: " + result);
},
error: function (xhr,status,error) {
alert("Status: " + status);
alert("Error: " + error);
alert("xhr: " + xhr.readyState);
},
statusCode: {
404: function() {
alert("page not found");
}
}
});
}
});
</script>
Run Code Online (Sandbox Code Playgroud)
即使JSP存在于提到的URL中,我仍然不断找到文件.请注意,我正在计算相对于webapp目录的JSP文件位置.
我尝试使用普通的AJAX调用(没有jQuery),但结果却出现了同样的错误.
你能不能帮我理解为什么它找不到jsp?
是否可以使用jquery .on()
方法而不是.delegate()
没有要监听的事件?
根据.on()
文件:
.on(events [,selector] [,data],handler(eventObject))
该events
参数是不可选的.
使用.on()
/ .delegate()
是动态添加元素.
我正在使用bitbucket和git来管理项目.我在Windows开发环境下没遇到任何问题,但是我在debian挤压方面遇到了问题.克隆时不存在问题,仅在推送时出现.我得到的错误是:
致命:无法找到'https'的远程助手
我尝试用curl编译它,尝试安装几个版本的curl,但没有成功.在这个问题中,git版本是1.7.1,答案是移动到1.7.7,但我的git版本是1.7.11
我怎样才能解决这个问题?
更新:
我的config.log说NO_CURL =''
使用https本身使用curl没问题
UPDATE2:
我的配置也说NO_OPENSSL =''
在root上执行find -name git-remote-*会显示以下信息:
./usr/share/man/man1/git-remote-helpers.1.gz
./usr/local/libexec/git-core/git-remote-fd
./usr/local/libexec/git-core/git-remote-ext
./usr/local/libexec/git-core/git-remote-https
./usr/local/libexec/git-core/git-remote-testgit
./usr/local/libexec/git-core/git-remote-ftps
./usr/local/libexec/git-core/git-remote-ftp
./usr/local/libexec/git-core/git-remote-http
./usr/lib/git-core/git-remote-https
./usr/lib/git-core/git-remote-testgit
./usr/lib/git-core/git-remote-ftps
./usr/lib/git-core/git-remote-ftp
./usr/lib/git-core/git-remote-http
./home/osednaca/git-1.7.11/git-remote-ftps
./home/osednaca/git-1.7.11/git-remote-ext
./home/osednaca/git-1.7.11/git-remote-https
./home/osednaca/git-1.7.11/git-remote-testgit.py
./home/osednaca/git-1.7.11/git-remote-ftp
./home/osednaca/git-1.7.11/git-remote-fd
./home/osednaca/git-1.7.11/Documentation/git-remote-helpers.txt
./home/osednaca/git-1.7.11/Documentation/git-remote-fd.txt
./home/osednaca/git-1.7.11/Documentation/git-remote-testgit.txt
./home/osednaca/git-1.7.11/Documentation/git-remote-ext.txt
./home/osednaca/git-1.7.11/git-remote-testgit
./home/osednaca/git-1.7.11/git-remote-http
./home/osednaca/git-1.7.11/contrib/mw-to-git/git-remote-mediawiki
./home/osednaca/git-1.7.11/contrib/mw-to-git/git-remote-mediawiki.txt
Run Code Online (Sandbox Code Playgroud) 现在,我正在使用form_for.select
和options_for_select
rails帮助器创建一个包含模型数据的选择框.但是,我真正需要的是像HTML5中引入的组合框:
<input type=text list=browsers >
<datalist id=browsers >
<option> Google
<option> IE9
</datalist>
Run Code Online (Sandbox Code Playgroud)
是否有用于创建此类元素的rails帮助程序?
我一直在尝试将我的工作javascript代码传递给CoffeeScript,但我无法传递此错误:
第55行无与伦比的OUTDENT
这是coffeescript代码
$(document).on("click",".save_button", ->
$form = $(this).parent().parent().parent().parent().parent().parent()
$form.bind("ajax:complete", ->
$actionURI = $form.attr("action");
$.get(window.location.protocol+"//"+window.location.host+$actionURI+".js",(data) ->
$form.parent().parent().prev().html(data); //Line 55
closeSaveElement()
,"html")
);
$form.submit();
return false;
);
Run Code Online (Sandbox Code Playgroud)
我已经尝试过放置和擦除;
,但我没有错.我也尝试改变->
,=>
但弹出同样的错误.
我正在尝试在MVC 3中的创建视图中填充组合框.这是我到目前为止所做的:
public ActionResult Create()
{
var db = new ErrorReportingSystemContext();
IEnumerable<SelectListItem> items = db.Locations
.Select(c => new SelectListItem
{
Value =c.id,
Text = c.location_name
});
ViewBag.locations = items;
return View();
}
Run Code Online (Sandbox Code Playgroud)
但是当我尝试运行它时会出现编译错误:
Cannot implicitly convert int to string
在这篇文章中,我读到了这样做
Value = SqlFunctions.StringConvert((double)c.ContactId)
Run Code Online (Sandbox Code Playgroud)
会解决问题然而当我尝试这样做时,我得到以下错误:
the name 'SqlFunctions' does not exist in the current context
我做错了什么?
更新:
做出Value = c.id.ToString()
错误:
LINQ to Entities does not recognize the method 'System.String ToString()' method, and this method cannot be translated …
我有一个总变量,我使用PHP/JS下拉框中的更改时使用刷新获取请求更新.似乎在Firefox中运行良好,但与Chrome/IE完全没有关系.有什么建议?
<form action='cart.php' onchange = 'go()'>
<select id = 'postinfo' name = 'postage'>
<script>
function go() {
var x = document.getElementById("postinfo").value;
if (x == "express") {
var price = 9.99
window.location.href = "cart.php?delivery=" + price + "&item=express";
}else if (x == "free"){
var price = 4.99
window.location.href = "cart.php?delivery=" + price + "&item=free";
}
}
</script>
Run Code Online (Sandbox Code Playgroud) javascript ×3
jquery ×2
ajax ×1
c# ×1
coffeescript ×1
debian ×1
git ×1
html5 ×1
jquery-on ×1
jquery-ui ×1