You can't access resources from other domains with AJAX. Cross-domain
policies.
The best way to do that is to create a proxy that your AJAX accesses
to get that remote content.
For example, your AJAX loads a PHP page on your domain that scrapes
the remote page's HTML and return it back to your AJAX script.

On Oct 29, 1:29 pm, matee <mato...@gmail.com> wrote:
> I need to load a few lines of HTML to my page. I made a test
> "receiver" page.
>
> <html>
>   <head>
>     <script type="text/javascript" src="http://ajax.googleapis.com/
> ajax/libs/jquery/1.3.2/jquery.min.js"></script>
>   </head>
>   <body>
>
>     <script type="text/javascript">
>       $(document).ready(function(){
>         $("div#events").load("http://ajtak.heroku.com/events.data";);
>        });
>     </script>
>
>     <div id="events">
>
>     </div>
>
>   </body>
> </html>
>
> I don't get it. If I try to load local HTML, ot works just perfect.
> But if try to load ie.http://google.comI get "400 Bad Request", or
> when I tryhttp://ajtak.heroku.com/events.dataI get "404 Not Found".
>
> So what's wrong? I'm pretty new to jQuery and all this AJAX stuff...
>
> Thank you for any answers :)

Reply via email to