showing result of calculating in textbox with jquery

0 votes

I want to calculate division of 2 TextBoxes's value (that shouldn't be empty) and show result in another new TextBox. How can i do that with jquery?

These are my code that don't work:

 $(document).ready(function () { 

    var payNumber=  $('#InsPayNumber').val();
    var insurancePrice=  $('#InsurerInsPrice').val();


    if (payNumber!=null && insurancePrice!=null) {

        if (  $('#HasInsPayWitTax').checked) {

            $("#InsPayInstallmentPrice").val( ( insurancePrice*3/100)/payNumber);
        }
        $("#InsPayInstallmentPrice").val( insurancePrice/payNumber);

    }else {
        $("#InsPayInstallmentPrice").val("");
    } 

});

Thanks.

Jul 25, 2022 in Web Development by gaurav
• 23,260 points
372 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Web Development

0 votes
1 answer

Loading gif in jQuery ajax call is not showing

Create a div with your image. Make it ...READ MORE

answered Jun 27, 2022 in Web Development by rajatha
• 7,640 points
1,276 views
0 votes
0 answers

How to scroll to top of page with JavaScript/jQuery?

Is there a way to control browser ...READ MORE

Jul 1, 2022 in Web Development by gaurav
• 23,260 points
1,958 views
0 votes
0 answers

jQuery exclude elements with certain class in selector

I want to setup a click event ...READ MORE

Jul 20, 2022 in Web Development by gaurav
• 23,260 points
974 views
0 votes
0 answers

How can I specify Google map with driving direction in jQuery mobile

I have done a Google Maps based ...READ MORE

Jul 20, 2022 in Web Development by gaurav
• 23,260 points
351 views
0 votes
0 answers

Getting the source of this click event in JQuery

I have multiple dynamically created buttons with ...READ MORE

Jul 21, 2022 in Web Development by gaurav
• 23,260 points
996 views
0 votes
0 answers

Getting the source of this click event in JQuery

I have multiple dynamically created buttons with ...READ MORE

Jul 22, 2022 in Web Development by gaurav
• 23,260 points
300 views
0 votes
1 answer

How to use jquery with asp.net ajax?

If you weren't aware, Microsoft is planning ...READ MORE

answered Oct 15, 2018 in IoT (Internet of Things) by Annie97
• 2,160 points
528 views
0 votes
1 answer

Is 'sparkline' a method?

I suggest you to check 2 things That jquery.sparkline.js is actually ...READ MORE

answered Nov 9, 2018 in Apache Spark by Frankie
• 9,830 points
1,004 views
0 votes
1 answer

What is jQuery?

Hey, jQuery is a fast and concise JavaScript ...READ MORE

answered Feb 14, 2020 in JQuery by kartik
• 37,510 points
996 views
0 votes
1 answer

Error: Global Variable is not accessable to local function

Hey kartik, A variable declared outside a function has a ...READ MORE

answered Feb 19, 2020 in PHP by Niroj
• 82,880 points
846 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP