1

In my page i had a button,when clicks on that button it has an ajax call.The code follows

   $(document).ready(function() {
     $('#one').click(function() {

    $("#one").load(
    "http://www.ggookkll.com/pinIt/?frm_firstName=" +encodeURIComponent('frm_firstName'));
 }); });

But my request is recieved successfully, but iam not getting any response.

The error is

 Origin http://127.0.0.1 is not allowed by Access-Control-Allow-Origin. 

Can anyone help me in solving this.

TomJoy
  • 233
  • 2
  • 4
  • 13
  • 1
    This might be useful as well: http://stackoverflow.com/questions/298745/how-do-i-send-a-cross-domain-post-request-via-javascript/7605119#7605119 – Juri May 14 '12 at 07:29

2 Answers2

1

The answer above is not completely accurate. jQuery can not make cross-domain AJAX requests.

Other libraries can, such as Frame.js and many more.

BishopZ
  • 6,269
  • 8
  • 45
  • 58
0

You cannot* make an cross domain ajax requests.

Use proxy server to handle this. OR

Use this library to handle that http://james.padolsey.com/javascript/cross-domain-requests-with-jquery/

Venu
  • 7,243
  • 4
  • 39
  • 54