0

EDIT: this error is caused by my facebook like script, however this script is still not working but without throwing any errors.

I am trying to display part of another page, by using $get and .find jquery functions, however it is giving me an error. I would expect to see if I was linking it to an external domain when I am not.

Here is my code:

        var ComponentSrc = "http://localhost/acatalog/8ft_Trampoline_Tent.html";
        $.get(ComponentSrc, function(data){
            $(this).children('div').html($(data).find('.page-content').html());
        })

However when running this from the following url: http://localhost/acatalog/8ft_Fun_Pink_Trampoline.html

it is giving me this error:

Given URL is not permitted by the application configuration.: One or more of the given URLs is not allowed by the App's settings. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App's domains.

I realize this error would be displayed if I was not linking to the same domain however I am not. Is it because its localhost?

Fabio Antunes
  • 22,251
  • 15
  • 81
  • 96
Simon Staton
  • 4,345
  • 4
  • 27
  • 49
  • 1
    This is not a CORS error, this is a FaceBook API error. Does your page use FaceBook? – Barmar Aug 16 '13 at 09:34
  • You'll find plenty of examples if you put the error message into the SO search box. – Barmar Aug 16 '13 at 09:35
  • possible duplicate of [Given URL is not allowed by the Application configuration](http://stackoverflow.com/questions/16345777/given-url-is-not-allowed-by-the-application-configuration) – Barmar Aug 16 '13 at 09:36
  • Aha your right I am getting completly confused, I am using the facebook like, and as its on localhost its giving me this error. – Simon Staton Aug 16 '13 at 09:37
  • Also its not a facebook page at all I am linking to, let me check to see if there are other errors that might be stopping this from working – Simon Staton Aug 16 '13 at 09:38
  • 1
    This question appears to be off-topic because its contents are removed – Scoregraphic Jan 23 '14 at 09:48
  • This is a problem with your facebook app settings, change them so you can use it on your localhost – Fabio Antunes Apr 04 '14 at 13:27

1 Answers1

2

you should use $('div#result').load('http://localhost/acatalog/8ft_Trampoline_Tent.html .page-content'); less complicated

Raza
  • 1,095
  • 11
  • 16