<p>You are trying to cross domains.</p>

<p>Look into jsonp for that:</p>

<ul>
<li><a href="https://github.com/jaubourg/jquery-jsonp" rel="nofollow">https://github.com/jaubourg/jquery-jsonp</a></li>
</ul>

CC BY-SA 3.0
2012-09-11T13:00:22.220Z
Don't cross the streams!
ripper234
CC BY-SA 3.0
2012-09-10T03:37:02.770Z
2012-09-10T03:37:02.770Z
Stephen Gornick
<p>I need some help with using JSON and the bitcoin / blockexplorer json calls. I'm not even sure if this is going to work. Basically 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.</p>

<p>Here's what I've done so far:</p>

<pre><code>function checkAddress(){
  var address = $('#wallet').val();
  $.getJSON('http://blockexplorer.com/q/checkaddress/'+address+'?format=json',{"format":"json"},function(data){
    alert('xxx == '+data);
  });
}
</code></pre>

<p>But it doesn't seem to be doing anything at all.. Is it even possible for me to use the blockexplorer with JSON to get the results? I'm incredibly new to bitcoin and I'm not entirely sure what I'm doing.</p>

<json-rpc><blockexplorer>
Why does calling BlockExplorer's checkaddress JSON API do nothing?
SoulieBaby
# Why does calling BlockExplorer's checkaddress JSON API do nothing?

(Asked by: username_0 on 2012-09-10)

I need some help with using JSON and the bitcoin / blockexplorer json calls. I'm not even sure if this is going to work. Basically 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.
Here's what I've done so far:
function checkAddress(){
  var address = $('#wallet').val();
  $.getJSON('http://blockexplorer.com/q/checkaddress/'+address+'?format=json',{"format":"json"},function(data){
    alert('xxx == '+data);
  });
}

But it doesn't seem to be doing anything at all.. Is it even possible for me to use the blockexplorer with JSON to get the results? I'm incredibly new to bitcoin and I'm not entirely sure what I'm doing.

**Tags:** json-rpc, blockexplorer


---

## 1 answers

### Answer by username_1 on 2012-09-10. Score: 4 | Accepted answer

You are trying to cross domains.

Look into jsonp for that:

* <https://github.com/jaubourg/jquery-jsonp>

> **Comments:**
> **username_2**: Don't cross the streams!  

---

