GreatWebGuy Self-proclaimed greatness is a hard thing to prove.

13Jan/091

Pandora cutting out using naviplay bluetooth stereo dock with iPhone

I have an iPhone 3G and recently bought a Naviplay bluetooth transmitter off of Amazon for $6 so that I could stream to my Sony S805 bluetooth headphones, since the bozo's at Apple decided to not make the bluetooth stereo protocol available directly from the iPHone. Yes both of these work with the iPhone, even though the Naviplay doesn't state that it will. Keep in mind even though the dock is designed to charge an iPod, it doesn't seem to charge the iPhone, minor problem. Anyhow I mostly listen to Pandora on my iPhone so that I can listen to a variety of music that I don't necessarily have on my iPhone, I noticed as soon as I started using the dock and the headphones that the sound kept cutting out in the headphones periodically. I tried a different dock, a different iPhone, removing apps, changing settings on the phone, same problem. Turns out something that Pandora does seems to be causing the intermittent sound problem, after trying just the iPod feature and a couple of other streaming applications, Pandora seems to be the only application that this happens with. So if you're having a similar problem with the dock, it's probably not the dock, your phone, or a rouge app just seems to be Pandora.

18Dec/0820

Setting your tabindex on your html forms automatically with jQuery

The tabindex is absolutely necessary for controlling the tab order through a really long form, from a usability and accessibility standpoint. This is probably not the preferred way to do this, you should be setting the tabindex attribute on all of your input elements in your html. Now if you work with lazy developers, that often forget to set the tabindex, you may find this to be an acceptable solution.

Quick walk through:

  1. The outside function is your document ready function in jQuery (explaining for those new to jQuery)
  2. The tabindex variable is there to keep track of the index across multiple forms on the page (another reason you may want to use something like this, if your view code is modular and split into a bunch of snippets or includes)
  3. The select grabs all the input and select elements on the page we then exclude the hidden input boxes
  4. We then set the tabindex and increment the variable
$(function(){
	var tabindex = 1;
	$('input,select').each(function() {
		if (this.type != "hidden") {
			var $input = $(this);
			$input.attr("tabindex", tabindex);
			tabindex++;
		}
	});
});
11Dec/080

Upgrading WordPress with the iPhone

I've been using InstantUpgrade for over a year now to keep my blog on the latest version of WordPress without fail. Every upgrade has been smooth and successful and has gone off without a hitch. This evening I got really brave and used my iPhone to upgrade to WordPress 2.7, again everything went smooth. The latest version, 1.0-beta2, lets you control whether the files are fetched via FTP or HTTP. I happen to still be on version 0.2, but things have been working so smoothly from version to version of WordPress, I have no plans to upgrade.

21Oct/080

inSpot.org a public service or a bad joke

Catching up on my buddies tweets, I ran into an interesting one.."Web 2.0 hookups gone bad," with a link to http://inspot.org/gateway.aspx. Just when you think everything has hit the web, around the corner comes something new and bold and if your a little twisted, a lot of fun. The gist of the site is that if you've possibly given somebody an STD you can send them a nice little ecard letting them know to get checked out, the best part is you can do it anonymously. The thing that got me going the most about this is that each card in a joking manner, broaches a very serious topic, I wouldn't take this seriously even if was sent with that intention. Ok, this is too much to resist, so if you're one of my 20 friends that received an ecard telling you anonymously to get checked for Chlamydia, you can rest assured, that this was a cruel and unusual prank and I'm sorry..please don't be mad. I can't think of a better use for this, after all the real asshole is the person that sincerely sends this instead of telling the person they just screwed in person. I know I pissed at least one of my friends off, definitely a bad joke....

16Sep/0822

Prevent double submit with jQuery

Another great "little" solution with jQuery. Needed a simple way to protect all the forms on our site from being double submitted. There was an attempted solution in place on our app, that added an onsubmit to every form with a function above it called ignoreDoubleSubmit that tried to trap the event of the button was clicked and not allow it to be clicked again. The problem was the event for the button wasn't present when the form was submitted so it would silently error out with a blink in the Firebug console. After weeks of fighting to have it fixed, I removed the code and reimplemented a working solution with jQuery

	$('form').submit(function(){
		$(':submit', this).click(function() {
			return false;
		});
	});