Archive for October, 2009
Going to Africa
Next Saturday I’ll be off to Africa to visit my girl, Maria. First stop will be Cape Town followed by Port Elizabeth, Masaka, Kampala, Serengeti, Dar es-Salaam and Zanzibar. At least that’s the plan so far. The adventures side of the trip will be covered by safari and whitewater rafting. And maybe, just maybe, we will be jumping of the 216 meter high Bloukrans bridge – the world’s highest bungyjump. Whoo-hoooo!!!
I will keep you all updated from here as often as I can. I don’t know how often I will be able to go online, but I’ll do my best. I guess it will be alright in South Africa, but I’m not too sure about Uganda and Tanzania.
I’ve also opened up a Flickr account where I’m hoping to publish some photos along the way. Again, it all depends on the ability to go online.
That’s it for now. Later!
iPhone Scroll To bookmarklet
Posted by Martin in Browsers, JavaScript, Web development on October 12th, 2009
Do you also get tiered of flickering your finger to scroll up and down loooong web pages? I was, so I wrote this JavaScript bookmarklet to do it for me. It enables you to enter a %-value where to (vertically) scroll on the page.
How to use it:
Just add and save a bookmark on any page. Open it for edit. Name it “Scroll to …” (or what ever) and paiste the JavaScript code below into the URL field.
javascript:window.scroll(window.pageXOffset,(prompt(%22Scroll%20to%20...%20(0-100)%22)/100)*document.body.clientHeight);
To use it, just select the bookmark from the bookmarks menu, enter a value between 0-100 (where 0 is the page top and 100 is the page bottom) into the prompt and hit OK.
Happy scrolling!
Output the source XML with XSLT
Posted by Martin in Tip, Web development on October 9th, 2009
Today I just learned something I’ve been looking for for a while. It’s super simple, but it can be very helpful. For those of us that needs to write and edit XSLT for XML you don’t own and can’t view – in my case from SharePoint. Here is a single line of XSLT that will output the source XML to your page.
<xsl:copy-of select="."/>
That’s it! I told you, super simple.
Remember that you will probably not see the code on the page since the nodes probably won’t be recognized by the browser.