title: How would I use JavaScript to retrieve text from a different website?
body: <p>Disclaimer: please excuse the religious aspects of this post.</p>
  
  <p>Anyway, the title says what I'm looking for essentially. I'm writing a program to find Bible references on a page, then display the actual verse in a tooltip upon mouseover of the reference.</p>
  
  <p>I'm hoping to get permission from this site eventually. Now, I've done research and I learned about the "Same Origin Policy"; but as far as I can tell this doesn't really apply because I'm not trying to call functions/methods from JavaScript on that site.</p>
  
  <p>All I want to do is grab a verse off of the page. I thought this site would be convenient because it will mark individual verses with the correct url like so: <a href="http://www.drbo.org/x/d?b=drb&amp;bk=47&amp;ch=16&amp;l=18" rel="nofollow">http://www.drbo.org/x/d?b=drb&amp;bk=47&amp;ch=16&amp;l=18</a>. I've tried loading this up in an iframe but I couldn't for the life of me get hold of the the <code>&lt;span&gt;</code> element with <code>class='highlight'</code> which is, by chance, the only span on the page.</p>
  
  <p>The attempt I just made today was to use JSONP in the form of:</p>
  
  <pre><code>function crossedFingers(variable) {
      alert(variable);
  }
  
  var scr = document.createElement('script');
  scr.setAttribute('type', 'text/javascript');
  scr.setAttribute('charset', 'utf-8');
  scr.setAttribute('src', 'http://www.drbo.org/x/d?b=drb&amp;bk=47&amp;ch=16&amp;l=18&amp;callback=crossedFingers');
  
  document.getElementsByTagName('head').item(0).appendChild(scr);
  </code></pre>
  
  <p>I also had a version where I had</p>
  
  <pre><code>function crossedFingers() {
      alert('hi');
  }
  </code></pre>
  
  <p>just to see if the function actually got called and it didn't. I'm using WAMP and I have these files in the www directory, but I'm not sure that should effect it. Any help would be appreciated, sorry if this in an inappropriate question!</p>
  
  <p>I've just been frustrated. @_@</p>