Play Any System Sound Through Airtunes Speakers

Airtunes speakers and iTunes are best friends and they don’t want to let anyone else play with them.

Well tough because now Airfoil is playing the good parent and making Airtunes play nice with everyone else too.

Install Airfoil on Mac OS X or Windows XP / Vista and you can select any application to grab the sound from and send it to your Airtunes speakers.

Continue reading “Play Any System Sound Through Airtunes Speakers”

Hide genre column and apple store links in iTunes 8 on Mac OS X

When I upgraded iTunes to version 8 and started messing around with iTunes genius I was a very happy man. Clever little tool that. Shame that iTunes store arrows were littered around the screen and the genre column was back. iTunes had also removed the option to hide it from the preferences. Grrrrrr.

Well if you don’t want to see the genre column at the top of iTunes 8 on mac then I have the answer for you.

Continue reading “Hide genre column and apple store links in iTunes 8 on Mac OS X”

Disable Select Options in Internet Explorer

Put your hands up if you hate developing for Internet explorer….

That would be most of you then.

I can’t stand its special ways of doing things, so when I find an easy work around it makes me happy.

The latest one I have had to find and put into practice is a method for disabling some Select dropdown options in a form. Internet explorer doesn’t support the disabled attribute on option elements. The following code will only work in standards complaint browsers (not in IE 6 or 7):

Continue reading “Disable Select Options in Internet Explorer”

Uppercase First letters with javascript

If you have a string in javascript and you want to the first letter to be uppercase / a capital then this line of code will do that for you:

str = str.slice(0,1).toUpperCase() + str.slice(1);

If you want to convert more than one letter then you might want to use the following. As examples if you wanted the first 4 characters uppercase use (0,3) and then (4) and if you wanted the first 2 uppercase you would use (0,1) and then (2)

str = str.slice(0,3).toUpperCase + str.slice(4);

Remember that an array starts at zero so always take one from the numbers you want.