JavaScript Remove functionality in text Filed not working

We are developing a PhoneGap app. We have 3 cases like this:

$("#dvData .quantity input").on('keyup', function() {
    var totalamount = 0;
    var discountAmount = 0;
    var LineAmount1 = 0;
    var vatAmount = 0;
    var FinalNetSales = 0;
    var qtyId = this.id;
    var qtyId1 = qtyId.substr(4);
    debugger;
    var sstextFieldvalue = $('#text' + qtyId1).val();

    alert(sstextFieldvalue);
    alert(sstextFieldvalue.length);

    if (sstextFieldvalue != "" || sstextFieldvalue != 0) {
        if (sstextFieldvalue > 20) {
            alert("Set1");
        } else {
            alert("FINE");
        }
    } 
    else {
        alert("REMOVE");
    }
});

When we enter more then 20 in text-field it's called first alert. If we enter a value in text-field it is called three alert. However, when we remove text-field value it's not call Second alert.

Please tell me what is wrong in my code.

Note: This code is working fine in browser but when we checked in my mobile devices it not working

Answer:1

I want to know if it is possible to use ng-repeat in a model that look like this: Example Model: $scope.items = { item1:{[1,2,3,4,5]}, item2:{[a,b,c,d,e]}, item3:{[a1,b2,c3,d4,e5]} }; The ...

I want to know if it is possible to use ng-repeat in a model that look like this: Example Model: $scope.items = { item1:{[1,2,3,4,5]}, item2:{[a,b,c,d,e]}, item3:{[a1,b2,c3,d4,e5]} }; The ...

I am trying to create textboxes inside <div id="screens"> </div>. I have a drop down menu for which I select the number of textboxes to be created. The JavaScript code I've written here ...

I am trying to create textboxes inside <div id="screens"> </div>. I have a drop down menu for which I select the number of textboxes to be created. The JavaScript code I've written here ...

  1. create text field dynamically javascript
  2. create text file dynamically in c#
  3. create text box dynamically in asp.net
  4. unity create text dynamically
  5. create text file dynamically in ssis
  6. create text file dynamically in java
  7. create static text dynamically mfc
  8. create text field dynamically
  9. create textbox dynamically in c#
  10. dynamically create text file in php
  11. jquery create input text dynamically
  12. javascript create input text dynamically
  13. dynamically create text boxes asp.net c#
  14. dynamically create text file javascript
  15. create kendo textbox dynamically
  16. dynamically create textbox in jquery

I'm using gridster to make a grid of links. The link should work normal when click on it. Problem is it's also get clicked after dragged. How can I stop it from being clicked after dragged? Please ...

I'm using gridster to make a grid of links. The link should work normal when click on it. Problem is it's also get clicked after dragged. How can I stop it from being clicked after dragged? Please ...

  1. prevent click while dragging
  2. jquery prevent click while loading
  3. jquery prevent click while animating

I'm using angularjs 1.3.2. How to get clipboard data on paste event? This question is like: "Paste" event in Angular [ngPaste] But in this question, the angularjs version is 1.2. And this ...

I'm using angularjs 1.3.2. How to get clipboard data on paste event? This question is like: "Paste" event in Angular [ngPaste] But in this question, the angularjs version is 1.2. And this ...

  1. paste clipboard data javascript
  2. paste clipboard data vba
  3. paste clipboard data in c#
  4. paste clipboard data to excel c#
  5. paste clipboard data
  6. clipboard data not suitable for paste