You need a JSONP callback for this: http://docs.jquery.com/Getjson
But the other web app must support it... _________________________________ Lois Griffin: I’m a naughty girl and I need a spanking! Peter Griffin: And I'm a paladin with 18 charisma and 97 hit-points, I can use my helm of disintegration and do 1d4 damage as my half-mage elf wields his +5 holy avenger. Lois Griffin: Wait a minute, paladins can’t use the helm of disentegration! Peter Griffin: oh — In that case then I’m a black guy. On Fri, Mar 20, 2009 at 00:24, James <james.gp....@gmail.com> wrote: > > No, I believe that calling example1.mydomain.com from > example2.mydomain.com will still not work. That is also considered a > separate domain. > > On Mar 19, 4:47 am, Adrian Grigoras <adrianc.grigo...@gmail.com> > wrote: > > If the call in in the same domain, but on another machine, it will > > work? > > > > For example, call example1.mydomain.com from example2.mydomain.com > > > > Thanks > > > > On Mar 19, 3:36 pm, MorningZ <morni...@gmail.com> wrote: > > > > > I'm not sure who you are replying to, but regardless, the $.ajax code > > > cannot call another domain > > > > > you'll have to use an <iframe> tag or work out something on your > > > server side code to call the remote domain and then call that code > > > from your javascript (pretty much using your server/code as a proxy) > > > > > On Mar 19, 5:46 am, Adrian Grigoras <adrianc.grigo...@gmail.com> > > > wrote: > > > > > > I have the same question. I want to load some external file, for > > > > example:http://www.google.com. > > > > > > This is my code: > > > > <html> > > > > <head> > > > > <title>jQuery - Ajax dynamic content loading</title> > > > > <script src="http://code.jquery.com/jquery-latest.js" > type="text/ > > > > javascript"></script> > > > > <script type="text/javascript"> > > > > function loadContent(id) { > > > > $.ajax({ > > > > url: "http://www.google.com", > > > > cache: false, > > > > success: function(html){ > > > > $("#contentArea").append(html); > > > > }}); > > > > > > } > > > > </script> > > > > </head> > > > > <body onLoad="loadContent();"> > > > > > > <div id="contentArea" style="margin: 20px 0px 10px 10px; > border: 1px > > > > solid #CCC; width: 780px; height: 250px; float: left;"> > > > > > > > > </div> > > > > > > </body> > > > > </html> >