Hi im trying to access a variable from a function i can acces it in the fuction but not outside:
Code:
<input type="submit" value="Do whatever" onclick="javascript:
usePointFromPostcode('<?=$aPostCode;?>',
function (point) {
MeLat=point.lat();
MeLon=point.lng();
alert('Latitude: ' + MeLat+ '\nLongitude: ' + MeLon);
return MeLat;
}
)
" />
<script type="text/javascript">
document.write(MeLat);
</script>
i can get the alert to work but not the document.write(MeLat);
THANKS IN ADVANCE
DIZZY