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.

asked Feb 4, 2012 at 18:22

1 Answer 1

2

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

answered Feb 4, 2012 at 18:25

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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.