Auteur/autrice : Aymeric

How to read a remote file and convert it to a Base64 string [JavaScript]

This code is based on the one found on StackOverflow — it’s compatible with IE8+, and all modern browsers: // get the remote file binary content function getBinary(file, callback) { var convertResponseBodyToText = function(e) { return e }; var xhr = new XMLHttpRequest(); xhr.open(« GET », file, true); if (xhr.overrideMimeType) xhr.overrideMimeType(« text/plain; charset=x-user-defined ») else { // for IE8 […]

« En attente d’éléments à copier » et « attente de l’application des modifications » [iOS]

Avec la sortie d’iOS 8 j’ai voulu mettre à jour mon iPad. Malheureusement, au moment de restaurer mes données, iTunes m’indique : « En attente d’éléments à copier » et tourne dans le vide pendant un long moment. En fait j’ai découvert que cela était dû à des applications qui ne doivent pas être compatibles, […]

Problem with the People Picker of Sharepoint

For one of my list I’ve had a very weird issue: one people picker didn’t work properly. If I entered a name and clicked to check it, then it didn’t work. If I saved it and then got back to the form, the value didn’t appear. This strange behavior is due to a missing SPAN […]

Communication between iframe and parent window [JavaScript]

In the iframe you’ll use the below code: window.parent.postMessage(« Hello World ! », « http://your.site.web »); And in the parent window: // function that will be called when the message is received function receiveMessage(event) { alert(event.data); // it’ll show « Hello World ! » } // we listen to a message if (window.addEventListener) { window.addEventListener(‘message’, receiveMessage, false); } else if (window.attachEvent) […]

Use hash word in the Sharepoint navigation

Let’s say you have the url http://my.site.com/myfolder/mypage.aspx#hash and you want to use it as a link into your left navigation bar in Sharepoint…. If you try putting that name, Sharepoint will not keep your link. The trick here is to add a questionmark juste before the #. The URL to use will be http://my.site.com/myfolder/mypage.aspx?#hash and […]

How to edit the default action for an icon in a Sharepoint Ribbon

I wanted to change the behavior of the « Edit Item » button from the Sharepoint 2010 ribbon of the Display Form (DispForm.aspx). It wasn’t really easy, so I finally found a solution that I’m going to share here. You’ll need to use JavaScript for that. In the below example, the click on the « Edit Item » will […]

Installer Android KitKat 4.4.4 sur le Sony Xperia Z1 Compact

La dernière version d’Android est disponible pour le Xperia Z1 Compact, et on trouve tous les tutoriaux nécessaires sur http://www.phonandroid.com : D’abord il faut télécharger la ROM Ensuite on l’installe Puis on peut rooter son téléphone Et enfin on peut installer un recovery

Show/Hide a Sharepoint fields in the NewForm, EditForm and DispForm

With the Sharepoint WebServices it’s possible to hide a field into the NewForm, the Editform and/or the DispForm. You’ll need to use JavaScript with jQuery and SPServices. It’s the UpdateList service that will do the trick. Once you have loaded the both librairies you can use the below code: var fieldsToUpdate = ‘<Fields>’; fieldsToUpdate += […]

Delete a User Custom Action from Sharepoint [JavaScript]

The MSDN documentation is a nightmare…. For example Microsoft provides an example to create a User Custom Action for Sharepoint, however there is no code about how to delete it. So here is the code to use to delete the usercustomaction just created with the above example: var siteUrl = ‘/site collection/site/’; function deleteUserCustomAction() { […]