Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

112
Views
Why the amount of input is not increased or decreased?

When I click on the increase or decrease button, the input value with the cartitemCount ID changes dramatically, but does not enter the onchange event, where is my problem, thank you for your help

 <div class="qty qty-changer">
    <fieldset>
    <input type="button" value="&#8210;" class="decrease">
    <input id="cartitemCount" onchange="EditCartItem()" type="text"
    class="qty-input" value="@item.Count" data-min="1" data- 
      max="@item.CurrentCount">
    <input type="button" value="+" class="increase">
    </fieldset>
 </div>

JavaScript code:

function EditCartItem()
    { 
     var cartitemcount=$("#cartitemCount").val();
       $.ajax({
        type: "Get",
        url: "/CartItem?handler=EditColorToCartItem",
         dataType: "json",
         contentType: "application/json",
         data: {count :cartitemcount} ,
         success: function (data) {
         if (data.isValid) {
           Swal.fire(data.message);
            }
        },
        error: function (xhr) {
            // do what ever you want to do when error happens
        }
            
        });
    }
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!