problem with IE and value

problem with IE and value

I am building a google maps application, where the latitude and longitude are set into a pair of fields, and if either of those changes, the value of a hidden field gets updated.

var $setcoords = function(){
var coordsfield = $(this).siblings('.coords');
var latval = $(coordsfield).siblings('.latitude').attr('value');
var lonval = $(coordsfield).siblings('.longitude').attr('value');
var latlonval = (latval + ',' + lonval);
$(coordsfield).attr('value', latlonval);
};
$('.latitude, .longitude').change($setcoords);

It works perfectly in FF, but IE returns 'undefined' for the 'latval' and 'lonval'

any idea WHY?!?

here is the markup from that section of the page

<input type="hidden"value="88,88" id="location" name="location" class="coords" size="12" maxlength="254" tabindex="9" >

<input type="text" class="latitude" size="12" maxlength="20" value="88" tabindex="9">

<input type="text" class="longitude" size="12" maxlength="20" value="88" tabindex="9">


Thanks!