javascript
13 06 2013
Want to set the Rating for the current page yourself with JavaScript? Here’s how. You will probably need to build your own rating control to get the rating for the current page and render it nicely, but until I figure out the SP JavaScript to update the OOTB control, here’s the code for actually setting […]
11 10 2011
Here’s a little snippet of code to grab the MySite host of the current environment using jQuery to pick it out from the user’s Welcome Menu.
|
var str = $('#ID_MySiteMenu').attr('onMenuClick');<br>var myHost = str.substring(str.indexOf('http://'),str.length-2);<br>alert(myHost);<br> |
Nice and simple!
22 01 2010
Ok, I think I screwed up somewhere – what I paste below breaks in all browsers, not just IE – if the getElementById is wrapped in a function and THEN called sometime after “OnLoad” is triggered, it works. Oh well… Original Article – This is strange. I have an issue which I have grossly simplified […]
22 01 2010
This is strange. I have an issue which I have grossly simplified in order to explain the situation. Below are two snippets of code which work perfectly fine in all browsers but IE. The second code snippet gives the error message: Message: ‘document.getElementById(…)’ is null or not an object As you can see, the difference […]