0

I have this ajax request but it only works locally (no, i am not using local server like wampserver), Am i missing something?

$.ajax({
                     url: "http://domain/folder/something.php",
                     dataType: "json",
                     type: "POST",
                      data: {
                                q: enviar
                            },
                    success: function( data ) 
                    {
                        //Some code


                    },//fin success
                 });//Fin ajax

also i get this error when the page is in the server: "No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://pageserver.com' is therefore not allowed access."

so if someone can explain me whats going on, i will be so thankful

Eduardo
  • 1
  • 1
  • Please google that error. This same issue comes up numerous times a day here and it is not hard to research – charlietfl Aug 25 '15 at 20:54

1 Answers1

0

What this means is the file you are trying to access does not have permissions set up for your application to talk to it.

Bryant Frankford
  • 401
  • 3
  • 14