AJAX doesn't work cross-domain, doesn't matter what function you are using. You have to either use JSONP (http://remysharp.com/2007/10/08/ what-is-jsonp/) or a proxy on your server.
On Feb 17, 12:48 pm, Kuma Pageworks <brian.overl...@gmail.com> wrote: > I get the 'restricted URI' error - since the URL is on a remote > server, $.get isn't working. I may have to use $.ajax. > > On Feb 17, 2:01 am, Ricardo Tomasi <ricardob...@gmail.com> wrote: > > > getScript is, as it's name says, for getting scripts. What happens > > when you use the code below? > > > $.get(getURL, function(xml){ > > alert(xml); > > > }); > > > On Feb 17, 3:33 am, Kuma Pageworks <brian.overl...@gmail.com> wrote: > > > > I posted about this before, but the response didn't help - so I > > > thought I'd try posting again. > > > > I have a function that's putting together a GET request and sending it > > > off with $.getScript to retrieve an XML file. When I get the response > > > back, Javascript throws an exception: missing ; before statement. I > > > take that to mean that jQuery is handling the XML like a Javascript > > > file. But the response is there! I can't get this to work with $.get > > > - it just hasn't worked. So what I'm wondering is if I can work > > > around this exception, or find some other way to get at the response. > > > Here's my code: > > > > if(hasError == false) { > > > $('#login').hide('slow'); > > > var getURL = > > > "http://***.com/app/xml.pl?Email=" + emailVal + > > > "&Password=" + passVal; > > > try { > > > $.getScript(getURL, function(xml){ > > > getXML(xml); > > > }); > > > } > > > catch (e){ > > > console.log(e); > > > } > > > > } > > > > If someone can explain how I can get $.get to work, I'd take that as a > > > positive step, too.