Gawel's blurb

Twitter updates

Feeds

Tags

Comments

Archives

Blogroll

How to use jQuery.getJson in a Firefox extension

jQuery work fine in a Firefox extension and it's easy to manipulate the DOM of the current document with it.

If you need to call some web services then it will fail. I've solved the problem and tried to submit a path on the jquery-devel mailing list.

The problem is not solved since it require some too specific Firefox code. So if you need this, check the patch I've submitted and apply the changes in the ajax function by yourself.

dalvir 26/08/2009 11:01

hi.. hi

System Message: ERROR/3 (<string>, line 3)

Unexpected indentation.
I'm using $.getJSON to get data from WCF service in the form om json. this is working fine in IE7 but in mozilla it returns nothing.

System Message: WARNING/2 (<string>, line 4)

Block quote ends without a blank line; unexpected unindent.

My code is

$.getJSON("http://localhost:3162/VirtualService/Settings.svc/GetAllCountries", function(data) {

System Message: ERROR/3 (<string>, line 9)

Unexpected indentation.
alert(data);
});

this code returning me the list of countries in json format.

so what to do in the case of mozilla.. regards dsingh

gawel 26/08/2009 14:57

Hi,

So you are not in a FF extension context. You may ask your question on the jquery mailing list.

dalvir 28/08/2009 08:17

Thanks gawel.