SharePoint 2010 中的ExecuteOrDelayUntilScriptLoaded,在2013 中使用时没有效果的问题。

Example:

SharePoint 2013 Code:

SP.SOD.executeFunc('sp.js', 'SP.ClientContext', sharePointReady);

function sharePointReady() {    alert("Ready"); }

SharePoint 2010 Code:

ExecuteOrDelayUntilScriptLoaded(sharePointReady, "sp.js");

function sharePointReady() {    alert("Ready"); }

<script type="text/javascript">
ExecuteOrDelayUntilScriptLoaded(GetIdeaItemCount,"sp.js");
var list;
function GetIdeaItemCount()
{
var context = new SP.ClientContext.get_current();
var web = context.get_web();
list = web.get_lists().getByTitle('TestFormLib');
context.load(list);
context.executeQueryAsync(Function.createDelegate(this, this.GetSuccess), Function.createDelegate(this, this.GetFailed));
} function GetSuccess(){
document.getElementById("spListItemCount").innerText=list.get_itemCount();
}
function GetFailed(sender,args)
{
alert('failed. Message:' + args.get_message());
} </script>

Refer: http://msdn.microsoft.com/en-us/library/jj245759.aspx

TroubleShoot: SharePoint 2013: ExecuteOrDelayUntilScriptLoaded 页面发布后不执行的问题的更多相关文章

  1. sharepoint 2013 sp1 patch安装后的手工运行

    在安装SP1 后,有时Center admin 会显示 那么必须在以administrator运行sharepoint 2013 powershell. PSConfig.exe -cmd upgra ...

  2. SharePoint 2013 附加内容数据库后出现404错误

    本文讲述怎样解决SharePoint 2013 加内容数据库(Content DataBase)后出现404错误. 笔者依照http://technet.microsoft.com/en-us/lib ...

  3. SharePoint 2013 自定义模板页后在列表里修改不了视图

    前言 最近系统从2010升级至2013,有自定义模板页.突然发现在列表中切换不了视图,让我很费解. 我尝试过以下解决方案: 去掉自定义css 去掉自定义js 禁用所有自定义功能 结果都没有效还是一样的 ...

  4. SharePoint 2013 单一页面赋设计权限

    本文介绍SharePoint的使用中,断开单一页面权限,给用户编辑权限以及操作中遇到的问题,希望给相关需要的人一个参考. 1.首先进入页面库,找到我们的页面,进入共享,如下图: 2.在弹出的窗口中选择 ...

  5. Status: Checked in and viewable by authorized users 出现在sharepoint 2013 home 页面

    点击home页面上方的publish-> publishing->publish

  6. SharePoint 2013让页面显示错误

    转:http://blog.csdn.net/zmoneyz/article/details/20460263 1. 在网站端口下,如80端口下的Web.config修改 (1)将<custom ...

  7. SharePoint 2013 SP1发布了

    好消息,SharePoint 2013 SP1终于发布了: SP1说明:http://support.microsoft.com/kb/2880552 下载页面:http://www.microsof ...

  8. SharePoint 2013 工作流平台的选项不可用

    问题描述 当我想创建一个SharePoint 2013 工作流的时候,打开SharePoint 2013 Designer(一下简称SPD),发现没有SharePoint 2013 工作流的选项.原来 ...

  9. [转载]Windows 2012 R2安装SharePoint 2013 手动安装工具软件

    之前介绍过在window 2012中安装SharePoint 2013,这次,借着SharePoint 2013 sp1补丁发布之际,介绍下在window 2012 r2中安装SharePoint 2 ...

随机推荐

  1. 中国电信物联网平台入门学习笔记7:NB-IOT信号如何检测

    NB-IOT设备会因为信号的原因,数据发不出.但数据发不出的原因有很多,这么排除是NB-IOT信号的问题呢?那就需要NB-IOT信号检测装置. 网上的信号检测设备 作为一个常年蜗居在实验室的穷屌丝而言 ...

  2. 二叉排序树:HUD3999-The order of a Tree(二叉排序树字典序输出)

    The order of a Tree Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) ...

  3. vagrant 安装ubuntu12.04 64 bit

    1 下载用于ubuntu 12.04 用于vagrant的镜像,虚拟机是virtualbox $ wget http://files.vagrantup.com/precise64.box jb@e3 ...

  4. [文章备份]Powershell Studio 2019 5.6.160 X64破解版 Crack

  5. CF 219 D:Choosing Capital for Treeland(树形dp)

    D. Choosing Capital for Treeland 链接:http://codeforces.com/problemset/problem/219/D   The country Tre ...

  6. Selenium WebDriver-通过断言页面是否存在某些关键字来确定页面按照预期加载

    #encoding=utf-8 import unittest import time import chardet from selenium import webdriver class Visi ...

  7. Leetcode30--->Substring with Concatenation of All Words(主串中找出连接给定所有单词的子串的位置)

    题目:给定一个字符串S(主串),一个字符串数组words,其中的字符串的长度相同.找到所有的子串位置,要求是words中字符串的一个连接: 举例: For example, given:s: &quo ...

  8. js 页面刷新 每N秒钟刷新一次页面

    <!-- 每5秒钟刷新一次页面 -->     <script>setTimeout("location=location; ", 5000); </ ...

  9. [git 学习篇] 提交文件

    http://www.liaoxuefeng.com/wiki/0013739516305929606dd18361248578c67b8067c8c017b000/0013743256916071d ...

  10. [uiautomator篇][8] 增加应用读取内置存储卡的权限

    1 要在androidmainfest.xml增加权限(这样之后,在设备上的权限才可以点击,不然是灰色) <uses-permission android:name="android. ...