2009/8/2 Nitin Borwankar <ni...@borwankar.com>:
> but when the type is "json" and I try alert(data.version) or
> alert(data['version'])  I get "undefined".
>
> $.get("http://localhost:5984/";, function(data){ alert(data.version); },
> "json" );
> $.get("http://localhost:5984/";, function(data){ alert(data['version']); },
> "json" );

Have you tried getJSON?:
http://docs.jquery.com/Ajax/jQuery.getJSON

Failing that you ought to be able to construct the request you need
using the more generic jQuery ajax method:
http://docs.jquery.com/Ajax/jQuery.ajax#options

Sorry I can’t try jsonp here - my couch is broken :/

Reply via email to