我正在尝试使用javscript创建一个网页,该网页使用基于表单的身份验证登录到sharepoint服务器,但它继续使用NTLM,这是基于Windows的身份验证.反正是否允许使用javascript进行基于表单的身份验证,因为此网页适用于移动和phonegap?提前致谢.任何帮助赞赏.
我的代码如下:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script src="jquery-1.6.2.min.js" type="text/javascript"></script>
</head>
<body>
<div>
<script type="text/javascript">
$(document).ready(function () {
var soapEnv = "<soap:Envelope xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'> \
<soap:Body> \
<Login xmlns='http://schemas.microsoft.com/sharepoint/soap/'> \
<username>username1</username> \
<password>password</password> \
</Login> \
</soap:Body> \
</soap:Envelope>"
// Call web service
$.ajax({
url: "http://servername:serverport/_vti_bin/authentication.asmx",
type: "POST",
dataType: "xml",
data: soapEnv,
complete: processListAccessResult,
contentType: "text/xml; charset=\"utf-8\""
});
});
// Process result
function processListAccessResult(xData, status) {
alert(xData);
alert(status);
}
</script>
<ul id="data"></ul> …Run Code Online (Sandbox Code Playgroud) 我目前正在学习如何通过Jeff LaMarche的Beginning iPhone 4开发书来为iPhone编码,但遇到了一个问题,我似乎无法看到问题出在哪里.我在很多论坛上都看到过,这是IBOutlets无法正确连接的问题,但我已经多次尝试过,问题不会消失所以我在这里寻求帮助.
Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIViewController 0x4b3c2a0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key datePicker.'
Run Code Online (Sandbox Code Playgroud) 我有两个页面,我使用swipeleft和swiperight事件(来回)链接,但当我滑到另一页时,jquery不会触发pageinit事件,我只剩下页眉和页脚.我应该使用changePage事件还是应该使用loadPage事件?我知道jquerymobile的另一个版本中有一个错误,其中pageinit事件没有触发,但我已经使用已经解决它的RC1但事件仍然没有触发.什么阻止它开火?提前致谢.
代码如下:
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, maximum-scale=1.0, user-scalable=no;" />
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title>esports</title>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.1.0-rc.1/jquery.mobile-1.1.0-rc.1.min.css" />
<link rel="stylesheet" href="jquery.zrssfeed.css" />
</script>
<style>
</style>
</head>
<body>
<!-- index -->
<div data-role="page" id="index">
<div data-role="header">
<h1>esports times</h1>
</div>
<!--/header-->
<div data-role="content" id="content">
<div id="currentFeed">teamliquid. skgamin</div>
<ul id="rssFeed" data-role="listview">
</ul>
</div>
</div>
</body>
</html>
<!-- load javscripts here-->
<script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
<script src="http://code.jquery.com/mobile/1.1.0-rc.1/jquery.mobile-1.1.0-rc.1.min.js"> </script>
<script src="jquery.zrssfeed.js"></script>
<script>
$('#index').bind("pageinit", (function () {
$('#rssFeed').rssfeed('http://feeds.reuters.com/reuters/oddlyEnoughNews', {
limit: 10, …Run Code Online (Sandbox Code Playgroud) 我目前正在设置一个<input type=date>带有Parsley字段的表单,以验证日期不能过去.但是,尽管给出了正确的值(将来),但我无法验证它.它似乎从min字段读取最小值,但我尝试更改格式(例如Y/m/d),但错误仍然会弹出.我能否知道这背后的问题是什么?它的解决方法是什么?提前致谢.
错误是This value should be greater than or equal to 10/21/2014.即使我比它晚了一个日期.
<input type="date" name="contact-date" id="contact-date" placeholder="MM/DD/YYYY" data-date-format="mm/dd/yyyy" min="<?php echo date('m/d/Y'); ?>" parsley-type="dateIso">
Run Code Online (Sandbox Code Playgroud)
我查看了KD的答案并意识到正则表达式是针对DD/MM/YYYY所以我改变了它
/^([12]\d|0[1-9]|3[01])\D?(0[1-9]|1[0-2])\D?(\d{4})$/ 至
/^(0[1-9]|1[0-2])\D?([12]\d|0[1-9]|3[01])\D?(\d{4})$/
虽然指定了最小值,但不知何故,这更改为传递的任何日期都是有效日期.
代码现在是:
<input type="date" class="contact-input" name="contact-date" id="contact-date" placeholder="MM/DD/YYYY" data-type="dateIso" data-parsley-min="<?php echo date('m/d/Y'); ?>">
Run Code Online (Sandbox Code Playgroud) 这是viewDidLoad中fetchRequest的代码,代码遵循这里的教程,只是我以编程方式链接导航控制器和tableview,而不是使用界面构建器.实体ProductInfo存在.但是,当我运行程序时,我收到错误:
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '+entityForName: could not locate an NSManagedObjectModel for entity name 'ProductInfo''
Run Code Online (Sandbox Code Playgroud)
我已经重置模拟器,因为它是一个旧模型,但错误仍然发生.我也切换到使用FetchedResultsController,但问题仍然存在.问题是因为这些fetchedResultsController方法不在appdelegate中?它们目前位于TableViewController中.我怎么解决这个问题?
viewDidLoad方法:
- (void)viewDidLoad{
NSFetchRequest * fetchRequest = [[NSFetchRequest alloc] init];
NSEntityDescription * entity = [NSEntityDescription entityForName:@"ProductInfo" inManagedObjectContext:context];
[fetchRequest setEntity:entity];
NSError * error;
self.productInfos = [_context executeFetchRequest:fetchRequest error:&error];
[fetchRequest release];
[super viewDidLoad];}
Run Code Online (Sandbox Code Playgroud)
ProductInfo.h:
@class ProductDetails;
@interface ProductInfo : NSManagedObject {
@private
}
@property (nonatomic, retain) NSString * productName;
@property (nonatomic, retain) NSString * productPrice;
@property (nonatomic, retain) …Run Code Online (Sandbox Code Playgroud) javascript ×3
cordova ×2
ios ×2
cocoa-touch ×1
core-data ×1
iphone ×1
jquery ×1
objective-c ×1
parsley.js ×1
sharepoint ×1
web-services ×1