JavaScript Strange behaviour of WebActivities under Firefox OS 1.2

I am writting a firefox os application and I found a strange problem. I have two web activities (open a link on a projects tab and sending an e-mail on the users tab ) what are work correctly under the Firefox OS 1.1 simulator but not work under the appmanager+firefox OS 1.2 simulator. In additional it did not work under my Keon phone with FFOS 1.2 prerelease.

Do you have any idea? Thanks.

Answer:1

Might not be the most optimal way but try something like:

function sendEmail(toEmail, subject, body) {
  var createEmail = new MozActivity({
    name : "new",
    data : {
      type : "mail",
      url : "mailto:" + toEmail + "?&subject=" + subject + "&body=" + body + "",
    }
  });
}
function processUsers() {
    if (xhr.readyState == 4 && xhr.status == 200) {
      var obj = jQuery.parseJSON(xhr.responseText);
      for (var i = 0; i < obj['users'].length; i++) {
        if (obj['users'][i].email != null) {
            var myLi = document.createElement('li');
            myLi.innerHTML = "<p>" + obj['users'][i].name+ "</p>" + "<p class='sendEmail'>" + obj['users'][i].email; "</p>";
            var em =obj['users'][i].email;
            var sb = '';
            var bd = '';
            myLi.onclick = (function(em, sb, bd) {
                return function(){ sendEmail(em, sb, bd) }
            })(em, sb, bd);
          $('#resultsUsers').append(myLi);
        } else {
          $('#resultsUsers').append("<li><p>" + obj['users'][i].name + "</p></li>");
        }
      }
      usersAreLoaded = true;
    } else {
      console.log("did not get data " + xhr.status);
    }
}
Answer:2

I want to build a JavaScript regular expression to match all words starting with "ad" or "ae", or all words that contain "-ad" and "-ae". This is what I've tried: var regex_string = "^[ad|ae]|-[ad|...

I want to build a JavaScript regular expression to match all words starting with "ad" or "ae", or all words that contain "-ad" and "-ae". This is what I've tried: var regex_string = "^[ad|ae]|-[ad|...

  1. regular expressions javascript cheat sheet
  2. regular expressions javascript tutorial
  3. regular expressions javascript examples
  4. regular expressions javascript
  5. regular expressions javascript online
  6. regular expressions javascript w3schools
  7. regular expressions javascript mdn
  8. regular expressions javascript pdf
  9. regular expressions javascript test
  10. regular expressions js
  11. regular expression javascript tester
  12. regular expression javascript email
  13. regular expression javascript validation
  14. regular expression javascript match
  15. regular expression javascript replace
  16. regular expression javascript generator
  17. regular expression javascript only numbers
  18. regular expression javascript special characters
  19. regular expression javascript phone number
  20. regular expression javascript email validation

I have an controller which is simply watching a 'name' property and prints its new and old values on any change. function Ctrl($scope) { $scope.$watch('name', function(newValue, oldValue) { ...

I have an controller which is simply watching a 'name' property and prints its new and old values on any change. function Ctrl($scope) { $scope.$watch('name', function(newValue, oldValue) { ...

I am trying to replace all occurences of 'S' (capital S) with '.sss' : For example the following line doesn't even contain a capital S in it and it still replaces a lot : "MM/dd/yyyy EEEE hh:mm aa"....

I am trying to replace all occurences of 'S' (capital S) with '.sss' : For example the following line doesn't even contain a capital S in it and it still replaces a lot : "MM/dd/yyyy EEEE hh:mm aa"....

I am pushing HTML Code including <script> in a div, I am able to push inside the div successfully using innerHTML but script is not executing. Code: $.ajax({ data: '', dataType: 'html'...

I am pushing HTML Code including <script> in a div, I am able to push inside the div successfully using innerHTML but script is not executing. Code: $.ajax({ data: '', dataType: 'html'...

  1. delete script after execution
  2. script execution timed out after 30000ms
  3. remove script after execution
  4. exit shell script after execution
  5. pause powershell script after execution
  6. exit bash script after execution
  7. javascript remove script after execution
  8. powershell delete script after execution