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) […]
Auteur/autrice : Aymeric
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
Firefox issue with encoding ISO-8859-15 and plain text
It appears that Firefox doesn’t understand the ISO-8859-15 charset when it’s related to a « plain/text ». So you need to change the charset to ISO-8859-1 to make sure that Firefox will show the special characters for your document.
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() { […]
Dynamically inject a CSS code into the page [JavaScript]
Mozilla created a function that permits to inject some CSS into the document: addStylesheetRules() But if you use jQuery you may want to use this function: function injectCSS(rule) { $(« head »).append(‘<style>’ + rule + ‘</style>’) } // example injectCSS(« div { padding:5px } »)
Tiny AJAX
This is a very tiny javascript code to do an AJAX Request: /* m: method (« get », « post ») u: url a: async (true) or sync (false) c: callback (with ‘xhr’ as a parameter) d: post_data (the data to post) */ function tiny_ajax(m,u,a,c,d){with(new(this.XMLHttpRequest||ActiveXObject)(« Microsoft.XMLHTTP »))onreadystatechange=function(){readyState^4||c(this)},open(m,u,a),send(d)} And an example: tiny_ajax(‘get’, ‘http://www.google.com’, true, function(xhr) { alert(xhr.responseText) })
Se connecter à son réseau local via le VPN de la Freebox Revolution
Grâce aux dernières mises à jour de la Freebox Revolution, il est maintenant possible de se connecter à son réseau local depuis l’extérieur. Cela peut être utile pour, par exemple, accéder à un ordinateur de son réseau, etc. On va d’abord ouvrir l’accès à sa Freebox depuis l’extérieur. Pour ce faire, se rendre sur http://mafreebox.freebox.fr/ […]