0

I need to call a web service from Javascript of a html page whose response will be in JSON. Can someone suggest me the best way to do this?

I have seen that XMLHTTPRequest can be used to do this. But I cannot use it due to same domain origin policy. My web service resides on an external server.

NOTE: I do not want to use jQuery or any such frameworks. Need to be done in plain Javascript only.

1 Answer 1

2

How about using jsonp? http://json-p.org/

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.