Click here to Skip to main content
15,884,628 members
Articles / Ajax

My following jquery function always execute Error block of alert but js.i-parcel.com is available

Rate me:
Please Sign up or sign in to vote.
0.00/5 (No votes)
29 Jan 2013CPOL 3.4K  
why My following jquery function always execute Error block of alert but js.i-parcel.com is available..------------------------ $(document).ready(function() { }); function checkIparcel() { $.ajax({ type: 'GET', url:...

Alternatives

Members may post updates or alternatives to this current article in order to show different approaches or add new features.

Please Sign up or sign in to vote.
29 Jan 2013Vyacheslav Voronenko
Is your page located on the same domain (i.e. on https://js.i-parcel.com')? If not, you can't just directly access it with $.ajax due to cross domain restrictions. (If there is an REST API, you might want to use JSONP, or perhaps use CORS for moderm...
Please Sign up or sign in to vote.
29 Jan 2013Tadit Dash (ତଡିତ୍ କୁମାର ଦାଶ)
I tested this and it is working fine.Going to success and giving alert 'Connected to i-parcel.'.Check Live Demo.[^]

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions