Change Query to mQuery Sharepoint Online

Normally I have this code:

 Getting our list items    $.ajax({         url: url + "/_api/web/lists/getbytitle('" + listname + "')/items?$select=Title,Enlace&$orderby=Posicion&$top=6&$filter=Idioma eq '" + lang + "'",        method: "GET",         crossDomain: true,         headers: { "Accept": "application/json; odata=verbose",          "X-RequestDigest": $("__REQUESTDIGEST").val() },          contentType: "application/json;charset=utf-8",         success: function (data) {            completeMenu(data, target);         },         error: function (data) {             failureMenu(data, target);        }     }); }     

So it works well, but I want to change it to mQuery, so I do:

     SP.SOD.executeFunc('mQuery.js', 'm$', function() {     m$.ready(function() {      SP.SOD.registerSod('sp.requestexecutor.js',         '/_layouts/15/sp.requestexecutor.js');     SP.SOD.executeFunc('sp.requestexecutor.js',          'SP.RequestExecutor',      function() {         var targetSiteUrl = url;     var targetUrl = url + "/_api/web/lists/getbytitle('" + listname + "')/items?$select=Title,Enlace&$orderby=Posicion&$top=6&$filter=Idioma eq '" + lang + "'"; var re = new SP.RequestExecutor(targetSiteUrl); re.executeAsync({     url: targetUrl,     headers: { "Accept": "application/json; odata=verbose" },     method: 'GET',     success:function(response) {     console.log(response);        completeMenu(respone, target);              }         });     }); })}); } 

But isnĀ“t works, I use breakpoints in source chrome console, it read this line:

 SP.SOD.executeFunc('mQuery.js', 'm$', function() { 

but the next one is not readed, what is wrong with my code? Regards

Replay

Category: sharepoint online Time: 2016-07-28 Views: 1

Related post

  • Change work hours in SharePoint Online 2012-05-23

    I want to change hours work in sharepoint online. I have found something like that: http://jamestsai.net/Blog/post/How-to-change-SharePoint-Calendar-default-start-hour-and-end-hour-of-Day-View.aspx Can I use this solution on SharePoint Online? If yes

  • Change color using CSS Sharepoint Online 2015-09-02

    I am using one of the default templates for SharePoint branding. How do I easily tweak the color as shown below in SharePoint Online? I Googled with no help. So far I changed the background using a WYSIWYG upload feature. The default WYSIWIG editor d

  • How do I change SharePoint Online Logo? 2011-07-25

    Anyone know how I can add my logo to SharePoint Online team site? --------------Solutions------------- I just did this the other day. For the external website, login to your O365 account, select Team Site, on the team site nav bar select Website, sel

  • Consume SharePoint online lists using REST API (in R) 2015-04-09

    I would like to be able to query lists that are on my sharepoint online site via R. I'm having difficulties ascertaining the right method for authenticating my requests. These requests would be primarily ad-hoc, and not some form of dedicated app. I'

  • SharePoint Online limitations 2012-12-14

    It seems like the content query webpart doesnt't exist in SharePoint online, at least not in my plan (Plan 2, E plans should have it). I didn't read that until I was looking for it. Does anybody know about a good overview about the limitations of Sha

  • Turning off custom script SharePoint Online 2014-09-17

    I was looking for a way to prevent users from changing the design in SharePoint Online. The documentation pointed me to http://office.microsoft.com/en-us/sharepoint-help/turn-scripting-capabilities-on-and-off-HA104182969.aspx. In my tenant (E3) I can

  • Change Search Query in SharePoint Online 2015-07-07

    I have a single, SharePoint Online site collection with many site pages. Most of the content on the site pages is filtered lists displayed using a content query web part. Search queries are set to go to a custom results page, and on that page I have

  • Querying the documents result source SharePoint online returns incorrect results 2013-11-14

    I'm trying to use the REST api on a SharePoint online site to get results that are only documents. My query string looks like this: _api/search/query?querytext='sti*'&rowlimit=2&sourceid='e7ec8cee-ded8-43c9-beb5-436b54b31e84'&selectproperties=

  • Caml query builder Office 365 Sharepoint Online 2012-01-25

    Does anyone knows where to find a CAML query builder that I can use for Office 365, Sharepoint Online? (if there exists one) --------------Solutions------------- The 2 popular CAML query tools are Strammit CamlViewer and U2U CAML Builder. They both s

  • Save the Excel Webpart changes in SharePoint Online 2012-05-08

    I have been displaying an Excel Workbook as a webpart in SharePoint Online. The users are allowed to edit the excel file. I am trying to save the changes done by the user. Is there any other way to save the changes in workbook other than this? I have

  • Changes in SharePoint Online (Office 365) 2012-09-18

    I have an idea to solve a problem by adding jQuery/javascript to a aspx page (in this case the DispForm.aspx) But I thought I've heard that SharePoint Online installs automatically updates. Can this updates have an impact on the jQuery I've wrote? Li

  • Change URL's address of SharePoint Online 2013-01-04

    I try to change the URL address from https://company.sharepoint.com - I using SharePoint Online (Office 365). Can Microsoft change this address? Or can I create address/record in my private domain, let's says sharepoint.mydomain.com that will be dire

  • SharePoint Online 2013 Workflow to change file permission in Document Library? 2013-05-28

    1.What are my options with SPD 2013 If I want to change file permission in a workflow? 2.Where does SPO host 2013 Workfows? 3.If connecting to SPO Can I use Worklow Manager 1.0? 4.Will I need to host my Workflow Manager workflows on server or Azure i

  • Surfacing an SharePoint Online Access Services query for use externally 2013-12-12

    Is there any way to write a query in Access Services for SharePoint Online, and surface its results through either web services or the Client Object Model for .NET? Like the way that the tables are surfaced as lists? Background We have an Access data

  • Are there any Specific Configuration Changes to Consider when Building an App for Sharepoint Online? 2014-02-07

    I'm accustomed to building and deploying solutions for on-premises Sharepoint instances. I was wondering if there's any configuration changes that must be made to ensure an app can be deployed to Sharepoint Online? Thanks much for your help and guida

  • Change displayed time range on day view of calendar (SharePoint online) 2014-10-31

    I have SharePoint online and am trying to customize a calendar view scoped down to the day level. Right now, it shows 7am - 7pm. I would like to have it show 8am - 5pm. How should I approach this? --------------Solutions------------- This is not a ca

  • Get list changes in Sharepoint Online 2014-11-26

    I am using CSOM library through Powershell to get a list of changes made to a list in Sharepoint Online. I am stuck while creating an object for the changecollection. Not sure how to get the data that comes from GetChanges. It doesn't return anything

  • change document file name via workflow - SharePoint Online 2014-12-16

    Is it possible to change the filename of document uploaded in sharepoint online/onpremises using workflow? We would like to have documents uploaded to sharepoint but unfortunately some have the same name and this from a folder structure :( When i use

  • SharePoint Online: Change properties 2015-03-12

    I am retrieving a change log for SharePoint Online site, but I am particularly interested in the who performed the change and on what item. $changeQuery = New-Object Microsoft.SharePoint.Client.ChangeQuery $true,$true $changeCollection = $ctx.Site.Ge

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development

search

Front-end development

Database

development tools

Open Platform

Javascript development

.NET development

cloud computing

server

Copyright (C) avrocks.com, All Rights Reserved.

processed in 0.338 (s). 13 q(s)