我正在使用JEditable jquery插件来更新我的网页上的一些数据.通过服务器上的JEditable插件保存数据后,我想用新的内容替换容器div中的旧内容,实际上与插入的数据不同(应用程序在保存之前处理了数据并添加了一些更多信息它).
我已经尝试过以下代码来做同样的事情,它第一次工作但是一旦在容器div中替换了数据,就会丢失可编辑的功能.
$(".editableComments").editable( function(value, settings) {
selectedId = $(this).attr("id");
$.ajax({
url:'ajaxApproveRequests',
type:'post',
data:{
requestType: "Trans",
idList : $(this).attr("id"),
comment: value
},
success: function(data) {
if (data != "Error")
{
$("#"+selectedId).html(data);
}
},
error: function(req) {
alert("Error in request. Please try again later.");
}
});
},
{
indicator : "Saving...",
type : 'textarea',
submit : '<input type="button" id="okBtn" value="Ok" onMouseOver="rollOnAutoButton(this)" onMouseOut="rollOffAutoButton(this)" class="autobtn" >',
cancel : '<input type="button" id="cancelBtn" value="Cancel" onMouseOver="rollOnAutoButton(this)" onMouseOut="rollOffAutoButton(this)" class="autobtn" >',
cssclass : "editableArea",
rows: 5,
cols: 25, …Run Code Online (Sandbox Code Playgroud) 我正在谷歌应用程序引擎中开发一个具有用户配置文件类功能的应用程序.我正在浏览Google App的在线教程,我发现静态文件(应用程序文件和静态文件)的最大数量不应超过3000.我担心当用户数量增加时,用户是否可以上传他们的图像.这是免费配额的限制,还是在结算后.在文档中,它提到的附加限制比免费配额.
请建议.
提前致谢.
我正在开发一个django-Google应用程序引擎项目.用户插入一些值,并使用谷歌应用引擎DateTimeProperty(auto_now_add = True)属性自动填充日期时间字段.现在,我必须在模板上显示此时间与用户查看结果的当前时间的差异.
例如,如果插入的时间是5:00并且用户正在6:00查看帖子,则结果应该是1小时.Django模板是否有可用的内置过滤器来执行相同的操作?我试过的时间是:
{{ topic.creation_date| timesince: now }}
Run Code Online (Sandbox Code Playgroud)
其中creation_date是日期时间字段.但它不起作用.
请建议.
提前致谢.
如何确保用户无法访问google appengine上的http地址?现在使用者可以使用https或http来访问网站,但有没有办法强制用户使用http协议来https网址?
我们有这样的HTML新闻通讯....
<table width="600">
<tr>
<td>
Text
</td>
</tr>
<tr>
<td>
<img src="demo.jpg" width="200" height="200"/>
</td>
</tr>
<tr>
<td style="font:arial;">
<img src="demo.jpg" width="200" height="200"/>
</td>
</tr>
<tr>
<td style="font:arial;">
<a href="#">
<img src="demo.jpg" width="200" height="200"/>
</a>
</td>
</tr>
</table>
Run Code Online (Sandbox Code Playgroud)
我需要添加style="font-size:0%"td的图像.我们没有在HTML中使用id或任何类.那么如何使用javascript .. ??
谢谢!!