Author: Aymeric

Breadcrumb / steps in CSS that works from IE8 [CSS]

I was looking for a simple code for a step by step process indicator. I found a few things, but everyone seems to have forgotten about IE8… I need to support this old browser at work. So I did my own that I’m sharing here: File Uploaded → File Reviewed → File Approved And the […]

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, […]

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 […]

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 += […]