<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Imagine Think Create Share : JQuery</title><link>http://blogs.msdn.com/carloshm/archive/tags/JQuery/default.aspx</link><description>Tags: JQuery</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>JQuery and SharePoint 2010 Javascript Conflict</title><link>http://blogs.msdn.com/carloshm/archive/2009/11/18/jquery-and-sharepoint-2010-javascript-conflict.aspx</link><pubDate>Wed, 18 Nov 2009 00:26:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9923986</guid><dc:creator>carloshm</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/carloshm/comments/9923986.aspx</comments><wfw:commentRss>http://blogs.msdn.com/carloshm/commentrss.aspx?PostID=9923986</wfw:commentRss><description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Yesterday I faced a problem with a PoC I did some months ago. I added a &lt;A title="JQuery rating Sharepoint" href="http://blogs.msdn.com/carloshm/archive/2009/08/24/jquery-rating-in-sharepoint-lists.aspx" mce_href="http://blogs.msdn.com/carloshm/archive/2009/08/24/jquery-rating-in-sharepoint-lists.aspx"&gt;ratings feature&lt;/A&gt; to SharePoint 2007 Lists using JQuery. &lt;/P&gt;
&lt;P&gt;There were a conflict caused by sp.js and jquery.js using prototype methods. I just followed the &lt;A title="Using jQuery with Other Libraries" href="http://docs.jquery.com/Using_jQuery_with_Other_Libraries" mce_href="http://docs.jquery.com/Using_jQuery_with_Other_Libraries"&gt;recomendations&lt;/A&gt; to avoid it.&lt;/P&gt;
&lt;P&gt;As I had put everything in my document ready area, I just reassigned JQuery, and use the new variable at that level:&lt;/P&gt;
&lt;P&gt;var $j = jQuery;&lt;/P&gt;
&lt;P&gt;$j(document).ready(function(){&lt;BR&gt;&amp;nbsp;$j('div.rating').rating();&lt;BR&gt;});&lt;/P&gt;
&lt;P&gt;This should remind us to double check our client code in SharePoint 2007 migration scenarios.&lt;/P&gt;
&lt;P&gt;Bye!&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9923986" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/carloshm/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://blogs.msdn.com/carloshm/archive/tags/JQuery/default.aspx">JQuery</category><category domain="http://blogs.msdn.com/carloshm/archive/tags/Migration/default.aspx">Migration</category><category domain="http://blogs.msdn.com/carloshm/archive/tags/SharePoint+2010/default.aspx">SharePoint 2010</category><category domain="http://blogs.msdn.com/carloshm/archive/tags/prototype/default.aspx">prototype</category></item><item><title>JQuery Rating in SharePoint Lists</title><link>http://blogs.msdn.com/carloshm/archive/2009/08/24/jquery-rating-in-sharepoint-lists.aspx</link><pubDate>Mon, 24 Aug 2009 11:22:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9882476</guid><dc:creator>carloshm</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/carloshm/comments/9882476.aspx</comments><wfw:commentRss>http://blogs.msdn.com/carloshm/commentrss.aspx?PostID=9882476</wfw:commentRss><description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Last week I was asked to create a sample to include in a SharePoint list rating functionality without any server code. That means only SharePoint Designer and client script.&lt;/P&gt;
&lt;P&gt;First was how to store those ratings. Based on experience the &lt;EM&gt;obvious &lt;/EM&gt;solution was to store scores in a separate list, and aggregate afterwards totals. This avoids locks at list level and improve scalability (at the end the aggregation was done from the self user).&lt;/P&gt;
&lt;P&gt;So to accomplish this demo, you will need:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Create a list that will have the totals and the items being scored (own columns and score column). &lt;/LI&gt;
&lt;LI&gt;Create a list to store user ratings (item_id, score, user_id)&lt;/LI&gt;
&lt;LI&gt;Create a view in the first list to show the rating control and allow the actions &lt;/LI&gt;
&lt;LI&gt;Modified that view with SharePoint Designer to &lt;EM&gt;customized&lt;/EM&gt; it: 
&lt;OL&gt;
&lt;LI&gt;Change list to XSLT view (through right click WebPartPages:listViewWebPart in order to get a WebPartPages:DataFormWebPart) &lt;/LI&gt;
&lt;LI&gt;Add a new layout column with the values to read (Item Id and aggregated score) and a style to apply (class=”rating”)&lt;/LI&gt;
&lt;LI&gt;Add JQuery library, web service library and rating library (to be included in the header adding script reference in additional page head placeholder) &lt;/LI&gt;
&lt;LI&gt;Add necessary styles and images to show the functionality &lt;/LI&gt;
&lt;LI&gt;Add custom code. You can check Jan &lt;A title="querying sharepoint list items using jquery" href="http://weblogs.asp.net/jan/archive/2009/05/06/querying-sharepoint-list-items-using-jquery.aspx" mce_href="http://weblogs.asp.net/jan/archive/2009/05/06/querying-sharepoint-list-items-using-jquery.aspx"&gt;posts&lt;/A&gt; and &lt;A title="JQuery addin rating" href="http://www.visualjquery.com/rating/rating_redux.html" mce_href="http://www.visualjquery.com/rating/rating_redux.html"&gt;rating samples&lt;/A&gt;.&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P align=center&gt;&lt;A href="http://blogs.msdn.com/blogfiles/carloshm/WindowsLiveWriter/JQueryRatinginSharePointLists_1F00/image_2.png" mce_href="http://blogs.msdn.com/blogfiles/carloshm/WindowsLiveWriter/JQueryRatinginSharePointLists_1F00/image_2.png"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: block; FLOAT: none; MARGIN-LEFT: auto; BORDER-TOP: 0px; MARGIN-RIGHT: auto; BORDER-RIGHT: 0px" title="ListViewWebPart to DataFormWebPart" border=0 alt="ListViewWebPart to DataFormWebPart" src="http://blogs.msdn.com/blogfiles/carloshm/WindowsLiveWriter/JQueryRatinginSharePointLists_1F00/image_thumb.png" width=294 height=307 mce_src="http://blogs.msdn.com/blogfiles/carloshm/WindowsLiveWriter/JQueryRatinginSharePointLists_1F00/image_thumb.png"&gt;&lt;/A&gt;&lt;FONT size=1&gt;Step 4.1&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE style="BORDER-BOTTOM: #cecece 1px solid; BORDER-LEFT: #cecece 1px solid; PADDING-BOTTOM: 5px; BACKGROUND-COLOR: #fbfbfb; MIN-HEIGHT: 40px; PADDING-LEFT: 5px; WIDTH: 480px; PADDING-RIGHT: 5px; OVERFLOW: auto; BORDER-TOP: #cecece 1px solid; BORDER-RIGHT: #cecece 1px solid; PADDING-TOP: 5px"&gt;&lt;PRE style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;&lt;SPAN style="COLOR: #0000ff"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #800000"&gt;TD&lt;/SPAN&gt; &lt;SPAN style="COLOR: #ff0000"&gt;Class&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #0000ff"&gt;"{$IDAEG2RE}"&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;&amp;gt;&lt;/SPAN&gt;
&lt;/PRE&gt;
&lt;PRE style="BACKGROUND-COLOR: #ffff00; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;&lt;SPAN style="COLOR: #0000ff"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #800000"&gt;DIV&lt;/SPAN&gt; &lt;SPAN style="COLOR: #ff0000"&gt;ALIGN&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #0000ff"&gt;"RIGHT"&lt;/SPAN&gt; &lt;SPAN style="COLOR: #ff0000"&gt;class&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #0000ff"&gt;"rating"&lt;/SPAN&gt; &lt;SPAN style="COLOR: #ff0000"&gt;title&lt;/SPAN&gt;=&lt;SPAN style="COLOR: #0000ff"&gt;"{@ID}_{@Puntos}"&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #800000"&gt;DIV&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;&amp;gt;&lt;/SPAN&gt;
&lt;/PRE&gt;
&lt;PRE style="BACKGROUND-COLOR: #fbfbfb; MARGIN: 0em; WIDTH: 100%; FONT-FAMILY: consolas,'Courier New',courier,monospace; FONT-SIZE: 12px"&gt;&lt;SPAN style="COLOR: #0000ff"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: #800000"&gt;TD&lt;/SPAN&gt;&lt;SPAN style="COLOR: #0000ff"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/PRE&gt;
&lt;P align=center mce_keep="true"&gt;&lt;FONT size=1&gt;Step 4.2&lt;/FONT&gt;&lt;/P&gt;
&lt;P align=left&gt;&lt;FONT size=2&gt;This will give us the ability to build the UI through JQuery and associate the code to manage list items. Final result:&lt;/FONT&gt;&lt;/P&gt;
&lt;P align=left&gt;&lt;A href="http://blogs.msdn.com/blogfiles/carloshm/WindowsLiveWriter/JQueryRatinginSharePointLists_1F00/image_4.png" mce_href="http://blogs.msdn.com/blogfiles/carloshm/WindowsLiveWriter/JQueryRatinginSharePointLists_1F00/image_4.png"&gt;&lt;IMG style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; DISPLAY: block; FLOAT: none; MARGIN-LEFT: auto; BORDER-TOP: 0px; MARGIN-RIGHT: auto; BORDER-RIGHT: 0px" title=image border=0 alt=image src="http://blogs.msdn.com/blogfiles/carloshm/WindowsLiveWriter/JQueryRatinginSharePointLists_1F00/image_thumb_1.png" width=202 height=135 mce_src="http://blogs.msdn.com/blogfiles/carloshm/WindowsLiveWriter/JQueryRatinginSharePointLists_1F00/image_thumb_1.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P align=left&gt;Bye!&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9882476" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/carloshm/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://blogs.msdn.com/carloshm/archive/tags/JQuery/default.aspx">JQuery</category></item><item><title>Use jQuery to make FrontPage requests</title><link>http://blogs.msdn.com/carloshm/archive/2009/01/22/use-jquery-to-make-frontpage-rpc-request.aspx</link><pubDate>Thu, 22 Jan 2009 19:56:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9369338</guid><dc:creator>carloshm</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/carloshm/comments/9369338.aspx</comments><wfw:commentRss>http://blogs.msdn.com/carloshm/commentrss.aspx?PostID=9369338</wfw:commentRss><description>&lt;P mce_keep="true"&gt;Hi,&lt;/P&gt;
&lt;P mce_keep="true"&gt;It is interesting to see JQuery growing in the SharePoint space. For sure client APIs will enrich the ecosystem of SharePoint applications.&lt;/P&gt;
&lt;P mce_keep="true"&gt;Some time ago, we needed a way to get some information we were storing in the property bag of our SPWebs. As the process to store the values were automated and the tests done programmatically; we really didn't care about any tool to manually check its values.&lt;/P&gt;
&lt;P mce_keep="true"&gt;But, the day arrived and we needed to review them in&amp;nbsp;preproduction environment. So how will you do it? well there are several ways to do it:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;Create a console/web&amp;nbsp;application and implement it through the &lt;A title="SPWeb.Properties Property (Microsoft.SharePoint)" href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spweb.properties.aspx" mce_href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spweb.properties.aspx"&gt;OM&lt;/A&gt;.&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;Open SharePoint Designer and read &lt;A title="Viewing Property Bag Values with SharePoint Designer " href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2008/06/24/viewing-property-bag-values-with-sharepoint-designer.aspx" mce_href="http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2008/06/24/viewing-property-bag-values-with-sharepoint-designer.aspx"&gt;them&lt;/A&gt;&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;Install &lt;A title="SharePoint Property Bag Settings " href="http://www.codeplex.com/pbs" mce_href="http://www.codeplex.com/pbs"&gt;third&lt;/A&gt; &lt;A title=PropertyBagFeature href="http://www.codeplex.com/SPWCMUtils/Release/ProjectReleases.aspx?ReleaseId=5040" mce_href="http://www.codeplex.com/SPWCMUtils/Release/ProjectReleases.aspx?ReleaseId=5040"&gt;party&lt;/A&gt; solution to do the job&lt;/DIV&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P mce_keep="true"&gt;They are all good candidates, but we couldn't neither install nor run a SPD instance or custom code; so I decided to run a web page :)&lt;/P&gt;
&lt;P mce_keep="true"&gt;Here it is when JQuery comes to the rescue:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;Download JQuery library from jquery.com and upload it to a (test) document library&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;Create a webpartpage in the same document library&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;Drop a content web editor webpart on any webpartzone&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;Update the contents of html with something similar to the following snippet, where the path starts from the web you want information from:&lt;/DIV&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;DIV style="COLOR: blue" mce_keep="true"&gt;&lt;CODE&gt;
&lt;P mce_keep="true"&gt;&amp;lt;script type="text/javascript" src="jquery-1.3.1.min.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;BR&gt;&amp;lt;script&amp;gt;&lt;BR&gt;$.ajaxSetup({&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; beforeSend: function(xhr) {xhr.setRequestHeader("Accept", "auth/sicily");xhr.setRequestHeader("X-Vermeer-Content-Type", "application/x-www-form-urlencoded");}&lt;BR&gt;}); 
&lt;P mce_keep="true"&gt;$.post("/site/_vti_bin/_vti_aut/author.dll", { method: "open service"},&lt;BR&gt;&amp;nbsp; function(data){&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $("#vermeer_content").append(data);&lt;BR&gt;&amp;nbsp; });&lt;BR&gt;&amp;lt;/script&amp;gt;&lt;BR&gt;&amp;lt;div id="vermeer_content"&amp;gt;&lt;BR&gt;&amp;lt;/div&amp;gt;&lt;/P&gt;&lt;/CODE&gt;&lt;/DIV&gt;
&lt;P mce_keep="true"&gt;you will get something like this:&lt;/P&gt;
&lt;P&gt;&lt;A title="JQuery Response FRPC" href="http://blogs.msdn.com/photos/carloshm/picture9432735.aspx" mce_href="http://blogs.msdn.com/photos/carloshm/picture9432735.aspx"&gt;&lt;IMG style="WIDTH: 352px; HEIGHT: 425px" title="JQuery Response FRPC" border=0 alt="JQuery Response FRPC" align=middle src="http://blogs.msdn.com/photos/carloshm/images/9432735/352x425.aspx" width=352 height=425 mce_src="http://blogs.msdn.com/photos/carloshm/images/9432735/352x425.aspx"&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;the sample just sends a request with a method that&amp;nbsp;provides meta-information for a Web site, in this case to&amp;nbsp;our client application.&lt;/P&gt;
&lt;DIV id=syntaxSection class=section&gt;
&lt;DIV id=ctl00_rs1_mainContentContainer_ctl01_other&gt;
&lt;DIV class=CodeSnippetTitleBar&gt;
&lt;DIV class=CodeDisplayLanguage&gt;&lt;/DIV&gt;&lt;/DIV&gt;
&lt;DIV dir=ltr&gt;&lt;PRE style="WORD-WRAP: break-word; WORD-BREAK: break-all" id=ctl00_rs1_mainContentContainer_ctl01other class=libCScode space="preserve"&gt;method=open service:server_extension_version&amp;amp;service_name=/[&amp;amp;effective_protocol_version=version]&lt;/PRE&gt;&lt;PRE style="WORD-WRAP: break-word; WORD-BREAK: break-all" class=libCScode space="preserve"&gt;References:&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;A title="open service Method" href="http://msdn.microsoft.com/en-us/library/ms446353.aspx" mce_href="http://msdn.microsoft.com/en-us/library/ms446353.aspx"&gt;open service Method&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A title="[MS-FPSE]: FrontPage Server Extensions Remote Protocol Specification" href="http://msdn.microsoft.com/en-us/library/cc231828(PROT.13).aspx" mce_href="http://msdn.microsoft.com/en-us/library/cc231828(PROT.13).aspx"&gt;[MS-FPSE]: FrontPage Server Extensions Remote Protocol Specification&lt;/A&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9369338" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/carloshm/archive/tags/SharePoint/default.aspx">SharePoint</category><category domain="http://blogs.msdn.com/carloshm/archive/tags/MOSS/default.aspx">MOSS</category><category domain="http://blogs.msdn.com/carloshm/archive/tags/JQuery/default.aspx">JQuery</category><category domain="http://blogs.msdn.com/carloshm/archive/tags/FrontPage+RP/default.aspx">FrontPage RP</category></item></channel></rss>