Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function loadConstants() {
- var ctx = new SP.ClientContext.get_current();
- this.site = ctx.get_site();
- ctx.load(this.site );
- this.web = ctx.get_web();
- var list = web.get_lists().getByTitle('VGuardWebMethodList');
- ctx.load(this.web);
- ctx.executeQueryAsync(Function.createDelegate(this, this.onSuccess),
- Function.createDelegate(this, this.onFail));
- }
- function onSuccess(sender, args) {
- IPC_siteUrl = this.site.get_url();
- alert(IPC_siteUrl );
- IPC_siteId = this.site.get_id();
- alert(IPC_siteId );
- }
- function onFail(sender, args) {
- console.log(args.get_message());
- }
- function callWebServiceMethodAjaxTest() {
- $j.ajax({
- type: "GET",
- cache: false,
- url: methodUrl,
- contentType: "application/json",
- dataType: 'json',
- beforeSend: function () { },
- complete: function () { },
- error: function (xhr, status, errorThrown) {
- alert(errorThrown);
- },
- success: function (result) {
- alert(result.d);
- }
- });
- }
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement