0

I need a request to be sent to an external website with the html back. I then need to extract the text within <td></td>. I am completely new to JSON, and am unsure if it's possible to do this using ajax.

Please could someone point me in the right direction and/or give example code.

2
  • Are you writing the external website as well? Commented May 7, 2011 at 20:36
  • No I'm not, should this make a difference? Commented May 7, 2011 at 20:38

1 Answer 1

1

You can't directly make a request to an external site via JS and read HTML from it. It's forbidden by the same origin policy. Either the external site has to support you by offering something like JSONP or CORS (not supported by all browsers yet), or you'll have to proxy the request via your own server.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.