Hi all
This is one that I thought I'd solved, thanks to Brian McEwen pointing me in the right direction. However, since upgrading to 8.3.10, the country bit doesn't seem to work anymore. The language bit still works though.
Can anyone spot anything obvious? My javascript and jquery knowledge ain't very good ...
<input name="GeoData_country" id="GeoData_country" type="hidden">
<input name="GeoData_language" id="GeoData_language" type="hidden">
<script type="text/javascript">
$.getJSON('http://api.wipmania.com/jsonp?callback=?', function (data) {
var country = data.address.country;
jQuery('#GeoData_country').val(country);
}); //EO document ready
</script>
<script type="text/javascript">
{
var userLang = navigator.language || navigator.userLanguage;
jQuery('#GeoData_language').val(userLang);
}; //EO document ready
</script>