开发者

SharePoint 2010 jQuery autocomplete

开发者 https://www.devze.com 2023-01-23 02:01 出处:网络
I\'m trying to create a custom field type with jQuery autocomplete functionality. But I\'m really stuck now.

I'm trying to create a custom field type with jQuery autocomplete functionality. But I'm really stuck now.

I want to use a WCF REST service that returns the necessary data. The data is not stored in a list. It stored in a DB2 database.

With ASP.NET MVC this is peanuts, but in SharePoint I'm开发者_JS百科 really struggling.

Does anyone have a good example.


You are not mentioning exactly 'how' it is not working, but I think that it may be down to preventing Cross Site Scripting attacks

I am guessing that your ASP.NET application is calling your REST service from the same domain whereas in SharePoint it would be under a different domain, and hence your browser is preventing it.

In JQuery you can get around this by calling JSONP (JSON with Padding) rather than JSON

The good news is that defining your WCF service to use JSONP is much easier in .NET 4.0

If you can't get this to work, I suggest updating your question with your JQuery code.


Try this controls: http://anjlab.com/en/project/sharepoint2010-richcontrols

0

精彩评论

暂无评论...
验证码 换一张
取 消