3,017 reputation
2720
bio website
location Norway
age 27
visits member for 4 years
seen yesterday

Apr
4
comment Javascript on masterpage returns undefined
What returns undefined? The function FeetchURL has no return and will then always return underfined. The global variable currURL will be set asynchronously, as ctx.executeQueryAsync is asynchronous, which means in you code you can't know when it is set
Apr
4
comment Get Context through REST call
Beside the part about context, if you just want to query the current user you can just query against /_api/web/CurrentUser, e.g., $.get('/sites/eirik/_api/web/CurrentUser', function(d) { console.log($('Email', d).text()); });
Apr
4
comment Get Context through REST call
For apps when you want to use an app context with REST use SP.AppContextSite, e.g., $.get("/_api/SP.AppContextSite(@target)/web/title?@target='http://localhost/sit‌​es/test'",function(d) { console.log(d); });
Apr
4
comment SharePoint Popup Close validation
This is true @alexander-ulmaskulov, although I for one consider IE8 to be good enough support
Apr
4
comment Provider Hosted app server error
Not sure what is the best approach, perhaps something simple as logging to a file? NLog or simply System.IO.File.AppendAllText or similar. If this is null then there is something funky about the session on your deployed site. Does it have Windows auth enabled?
Apr
3
comment Sharepoint Hosted Permission (SP 2013)
Have you tried to set yourself as Site Collection administrator on the SPSite you try to deploy to? Also if this is for development you could try to enable the developer feature (simply Enable-SPFeature Developer -Url <SPSite url>
Apr
3
comment Sharepoint 2013 delete AttachmentFiles by JS
Updated, hope this helps :)
Apr
3
revised Sharepoint 2013 delete AttachmentFiles by JS
added 1409 characters in body
Apr
3
comment Wher to put ContentPlaceHolderMain in custom master page
Good point. I guess we just have to wait for OP to deliver
Apr
3
comment Wher to put ContentPlaceHolderMain in custom master page
Are you sure? Isn't the div the syntax for the 2013 branding stuff
Apr
3
comment SharePoint Popup Close validation
It might be a bit "much", but how about storing a User Profile property?
Apr
3
comment SharePoint Popup Close validation
Isn't localStorage a better option if one is doing client side anyway?
Apr
3
comment Custom Ribbon Sharepoint 2013 Custom Action with javascript
Could it be permission? Have you tried, just for the sake of testing, to give full control on web and lists?
Apr
3
comment Provider Hosted app server error
At the bottom of the file SharePointContext.cs there should be a LoadSharePointContext, one for each "type", that is probably using httpContext.Session, is this session null?
Apr
3
comment Custom Ribbon Sharepoint 2013 Custom Action with javascript
Do you get the error if you try to deploy without the custom action as well?
Apr
3
answered Sharepoint 2013 delete AttachmentFiles by JS
Apr
3
comment How to make web part with properties for Js Development only
A SharePoint hosted solution can be deploy on any 2013 SharePoint, such as on premise. Note that you need to enable apps on your site for it to work.
Apr
1
awarded  Nice Question
Mar
31
comment The remote server returned an error: (401) Unauthorized
This actually works. I have no idea why, but it feels wrong. You can do something like this: var clientContextHack = new ClientContext(clientContext.Url). I can fetch the file through clientContext.Web.GetFileByServerRelativeUrl, but not OpenBinaryDirect without the hack.
Mar
31
comment Powershell add sitecollection primary adminstrator
Well, the $web variable in OPs gist does not yet exist, so what SPWeb to use from my snippet is up to him/her :)