Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8599223
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T01:21:02+00:00 2026-06-12T01:21:02+00:00

Here is my code: $.ajax({ url: ‘xxx’, success: function(data) { if (data.trim() == ‘0’)

  • 0

Here is my code:

$.ajax({
          url: 'xxx',
          success: function(data) 
          {
             if (data.trim() == '0')
             {
                //IF CODE
             } 
            else
            {
              //ELSE CODE
            }
         }
    });

This code working fine everywhere where I want to use, but not working in case of Firefox extension.

I read the following stackoverflow articles but no avail:
Call to $.ajax from firefox extension not working and
Ajax In Firefox Plugin

Also try to use xmlHTTPRequest but the result is same.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T01:21:04+00:00Added an answer on June 12, 2026 at 1:21 am

    You should use the request module given by the addon sdk. You can call and use this module only in the add-on script and not in content script.

    If you need to do an ajax request from a content script use the communication between content script and addon-script. You can find the documentation here.

    If you want, I have an example of code (I assume it can be difficult to read it) but it can be help you.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here's the code: $.ajax({ url:http://.....pullEntireDBPopulation.php, cache:false, datatype:json, success:function(popData){ alert(Population size: + popData.length); popProducers =
Here is the code I'm currently using: $.ajax({ success: function(){ $('.post_container').append('test <br />'); }
Here is my code: $.ajax({ url: /api/invoice/ + newInvoice._id, type: 'PUT', data: JSON.stringify(newInvoice), dataType:
here is my JS code: $.ajax({ url: 'login.php', type: 'POST', data: { loginName: $(#loginName).val(),
i'm generating this code $.ajax({ url: '/orders/modify/action/', type: POST, dataType: 'json', data: 'id='+10+ '&commento='+$('#shop_order_status_history_comments').val()+
Here is my Ajax code: var email=abc@abc.com; $.ajax({ url : ships, data : {email
How to get array data from json in c#? Here is the ajax code
I'm using ExtJS to perform an AJAX request. Here's my code Ext.Ajax.request({ url: 'TestServer',
Here's my nonworking attempt: <script> function uploadImageSubmit() { var imageFile = $('.imageFile').val(); $.ajax({ url:
I have the following jQuery code: $.ajax({ url: Url, dataType: 'JSONP', type: 'POST', success:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.