IE9 jQuery Radio checked issue

03 Oct 2011

I just spend 4 hours to read a simple radio selection via jQuery in IE9 from the following form.

1
2
3
4
5
6
<form name="myForm" id="myForm">
	<input type="radio" name="cTitle"  value="1" />Mr
	<input type="radio" name="cTitle"  value="2" />Miss
	<input type="radio" name="cTitle"  value="3" />Mrs
	<input type="radio" name="cTitle"  value="4" />Ms
</form>

How could this be a problem you think? Exactly a quick google search and as expected the following code worked just fine in almost all browser exept IE9 ggrrrrrr:

1
2
var cTitle = $('input:radio:checked', '#myForm').val();
var cTitle = $('input[name=cTitle]:checked', '#myForm').val();

Yes the second attempt was close but i was missing the  around the radio name and should have taken the  to get the objects :(

1
var cTitle = $("input[name='clientTitle']:checked").val();

I know a prime example of copy and paste and not really using my head.

So just in case you run into similar problems give it a try and hopefully save some time.

Dynamic google map markers via simple jSon file

27 Jun 2011

After making my previous post on how to simply store comments in a jSon file (and the comment from Brian) I decided to write an additional HOWTO create dynamic markers and store them in a jSon file.

It also includes an automatic geo data lockup via Google GeoCoder and generates a detail html file for-each marker created, which then will be loaded dynamic when the marker is clicked.

Check out the working example or download the code.

Read the rest of this entry »