
I’m a big fan of the web-based media viewer application Shadowbox and use it where necessary. However in a recent project I noticed that the contents of the window over which the shadowbox overlay opens, remains scrollable using the mouse wheel.
I wanted to prevent this behaviour and as usual I performed a Google search. I found many questions on it, but no answers. So I looked into it myself and managed to come up with something that works and is quite easy really.
Read the rest of this entry »

I’ve just written a simple post over at HTML5 Laboratory all about the HTML5 drag and drop API.
It’s by no means a complete explanation of the contents of this API, but it does give a sample of what can be done with this useful new feature that’s part of HTML5.

As with most web developers, the usage of PNGs within Internet Explorer 6 has always caused a headache, and whilst there are many JavaScript fixes out there, one of the best so far is DD_belatedPNG by Drew Diller.
Unlike most of the other IE6 PNG fix scripts out there, this one makes use of Microsoft’s implementation of VML instead of Microsoft’s AlphaImageLoader filter, as PNG images show up correctly in a VML fill element.
I have found this to be the best option out there at the moment for getting PNGs to work within IE6.
However, I recently found an issue with it, that granted, not many people will need to do, but I did and I also found a solution for it.
Read the rest of this entry »

Recently I decided to provide all the copyright dates on my sites in Roman numerals rather than decimal, just for something different. It’s not a major change I know, but it was something I wanted to do.
Read the rest of this entry »
Just a quick and simple post, that’s possibly nothing new to you, but it might be useful to others.
If you want to perform a check on what a string starts with in Javascript, you can use the substring(startpos, endpos) method, startpos is a required parameter and indicates where in the string to start the extraction, endpos is optional and indicates where the extraction is to end (if not supplied, it will extract to the end of string).
For example, to check if a string starts with ‘ABC’ you would do the following:
var mystring = "ABCDEF";
var text = mystring.substring(0, 3);
if (text == 'ABC') alert("string starts with ABC!');
Note that if the string being extracted from is shorter than the amount to extract, e.g. using the above example if mystring = 'AB', the extraction will still work, but in this case text = 'AB'.