Hi Joe,

   Thanks a lot for your suggestion. It works. However, I got error while
calling remotely with the following exception from javascript:

invalid label
[Break on this error] {"user":{"items":[{"name":"Vinod
Abraham","email":"[EMAIL PROTECTED]"},{"name":...

when using
$.getJSON("http://www.stufftolet.com/test/usercontacts.js?callback=?";,
function(json){}

if I changed it to local like

$.getJSON("usercontacts.js?callback=?", function(json){}

i got :

invalid label
extend("{"user":{"items":[{"name":"Vinod
Abraham","email":"[EMAIL PROTECTED]"},{"name":"Gurussidan
Kumar","...")jquery-1.2.3-min.... (line 20)
handleError(XMLHttpRequest channel=[xpconnect wrapped nsIChannel],
"script")jquery-1.2.3-min.... (line 29)
ready(319)jquery-1.2.3-min.... (line 28)
[Break on this error] {"user":{"items":[{"name":"Vinod
Abraham","email":"[EMAIL PROTECTED]"},{"name":...


Appreciate if you could further advice me on this.

regards,
Mark


Joe Maller-2 wrote:
> 
> 
> I've had issues where jQuery's JSON requests were treated as XHRs if
> there was no JSONp callback. That obviously doesn't work going cross-
> domain.
> 
> If you change your url to /http://stufftolet.com/test/usercontacts.js?
> callback=?" it should work, though you're going to need to hook up the
> result.
> 
> joe
> 
> On Mar 7, 9:55 am, Plant More Tree <[EMAIL PROTECTED]> wrote:
>> Hi guys,
>>
>>     if tried the following where usercontacts.j is in my localhost pc
>> windows vista (tomcat6) and alert showed like [object object] mean
>> there's
>> some object in json argument:
>>
>>     $.getJSON("usercontacts.js", function(json){
>>       alert(json);
>>     });
>>
>> so when I changed to remote location :
>>
>>     $.getJSON("http://stufftolet.com/test/usercontacts.js";,
>> function(json){
>>       alert(json);
>>     });
>>
>> the alert doesn't work alert anymore. However, both behavior (local and
>> remote) works on windows xp in my office. Is it some kind of security
>> issue
>> where stupid vista try to block outgoing connection? Appreciate any
>> advice
>> and help, Thanks !
>>
>> regards,
>> Mark
>>
>> --
>> View this message in
>> context:http://www.nabble.com/%24.getJSON-doesn%27t-work-on-Vista-PC-while-ca...
>> Sent from the jQuery General Discussion mailing list archive at
>> Nabble.com.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/%24.getJSON-doesn%27t-work-on-Vista-PC-while-calling-remote-server-tp15893358s27240p15933853.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.

Reply via email to