JSONP is restricted due to CSP policies. If you are gonna be a trusted app you can use SystemXHR mechanism
See https://github.com/mozilla-b2g/gaia/blob/master/apps/communications/manifes t.webapp#L78 And https://github.com/mozilla-b2g/gaia/blob/master/apps/communications/contact s/js/fb/fb_query.js#L36 best El 23/01/13 16:53, "Avi Laviad" <[email protected]> escribió: >Hi, >I'm trying to port my phonegap application to FirefoxOS. >I have below code: >$.ajax({ > url: 'myurl.com', > dataType: 'jsonp', > data: ({ }), > success: function (data) {} > error: function (jqXHR, textStatus, errorThrown) {} >}); > >this code is working ok in all platforms, >but when trying to run it via FirefoxOS emulator i got this error: >[JavaScript Warning: "CSP WARN: Directive script-src >app://myapp44.gaiamobile.org violated by >http://myurl.com?callback=jQuery1820787043830736376_1358956321820&_=135895 >6321935 >"] > >What should I do to enable AJAX calls? >Avi. >_______________________________________________ >dev-b2g mailing list >[email protected] >https://lists.mozilla.org/listinfo/dev-b2g > ________________________________ Este mensaje se dirige exclusivamente a su destinatario. Puede consultar nuestra política de envío y recepción de correo electrónico en el enlace situado más abajo. This message is intended exclusively for its addressee. We only send and receive email on the basis of the terms set out at: http://www.tid.es/ES/PAGINAS/disclaimer.aspx _______________________________________________ dev-b2g mailing list [email protected] https://lists.mozilla.org/listinfo/dev-b2g
