I'm trying to validate a bitcoin wallet address. I want it to check against the blockexplorer to see if it's a "valid" address or not. I have written this code but its not working:
function checkAddress(){
var address = $('#wallet').val();
$.getJSON('http://blockexplorer.com/q/checkaddress/'+address+'?format=json',{"format":"json"},function(data){
alert('xxx == '+data);
});
}
Can someone tell me how to do it?