Questions tagged [jquery-calculation]

101 questions
3
votes
1 answer

Using jquery to show total price in form

What I am trying to do is add the price when user selects an option from a drop down in form.. The from submits data to the database as well so the fields have values assigned as "selfpickup" and "delivery".. What I want is to assign price to the…
Umy Raff
  • 31
  • 2
2
votes
4 answers

Javascript Convert Hours and Minutes into Days

I'm sorry if something similar might be discussed before, but I really need help with it. Bellow is the code all I want to do is if the number goes over 24h it should switch to 1 day and 0 h, I can't figure it out if someone can please explain how…
Cody
  • 409
  • 1
  • 6
  • 18
2
votes
1 answer

Reordering divs by Matrix-Calculation (according to MULTIPLE data-attribute values)

I have a list of products that I wanna sort. Sorting by price and duration is an easy one. But I wanna find the BEST overall producte as well. Here is what I have so far: var divList = $(".listing-item"); /*…
JonSnow
  • 466
  • 8
  • 36
2
votes
2 answers

Appended row calculation using jquery not working

I am trying to calculate in appended rows values. But, calculation scripts not working. Is there any confliction between jquery-slim and jquery? I am using bootstrap 4 and laravel framework for this project. I tried various jquery scripts for this…
Rashed Hasan
  • 3,414
  • 5
  • 29
  • 71
2
votes
3 answers

Numbers Calculation Output with Commas

I have a calculation app that I am building, and I have it where the input displays comma's and the calculation can still run despite the commas, but now I cannot get the output to display with thousand separator commas. I have tried almost…
AaronS
  • 131
  • 10
2
votes
1 answer

calculate position of a point on image in percentage

I am calculating position of a point on a image with the formula below in pixel, where oW is original image width and oH is original image height. var x = oW * parseInt(document.getElementById('pageX').value - $tagImage.offset().left - 5) /…
Abhishek Kumar
  • 1,680
  • 3
  • 21
  • 33
2
votes
3 answers

Calculating cart total using jQuery

I'm trying to do something I thought would be simple (!), but having trouble. Every time a user updates the form below, I want to update the cart total by multiplying the quantity (input values) by the data attribute unit-price. I thought I would…
Osu
  • 1,105
  • 2
  • 17
  • 32
2
votes
1 answer

Calculate sum of columns

I have table in which the columns have two input fields. I want to calculate the sum of the first input field of the child rows and add the total corresponding to the first input field of the parent row of the column. Right now with the code, it…
input
  • 7,214
  • 23
  • 91
  • 143
2
votes
3 answers

how do i calculate 2 input fields and put results in 3rd input field

i want to have a form whereby i can add a value into the first text field, multiply that by a second hidden field, and display results in a 3rd text field. I want it so as soon as you add a value to the first field it shows the result in the 3rd…
user2489811
  • 77
  • 1
  • 2
  • 7
2
votes
1 answer

jQuery create a page "map-overview"

I try to create a "page 'map'-overview" like this (or even more complex like this) however I stuck at the calculation, dont know where or how the problem can be eliminated. Here's what I've done so far: var Overview = (function() { …
yckart
  • 28,174
  • 7
  • 112
  • 121
1
vote
5 answers

jQuery interest calculator - calculate amount of credit from monthly payment

I wrote small jQuery interest calulcator. it is calculating amount of credit from monthly re-payment LIVE DEMO HERE The problem is that my interest calculation logic is just purely wrong. Have a look: //Get the value - monhtly repayment var…
Iladarsda
  • 10,250
  • 38
  • 99
  • 165
1
vote
2 answers

How to customize jAutoCalc plugin

I have a simple question regarding jAutoCalc, my question can be answered in two ways: 1> How to customize the jAutoCalc plugin so that we can make it able to be used for input array names instead of just names. my code is here: …
1
vote
1 answer

Calculate sum based on selected item

I have a form in which the user has to select the item name, item attributes and enter the item quantity. A new form is cloned if the user wants more items. I want to calculate the sum of all quantities of specific item name. Use Case: The user…
input
  • 7,214
  • 23
  • 91
  • 143
1
vote
1 answer

Math.pow() coming out wrong

I'm trying to create a JavaScript version of this equation that I got working in Excel: Excel version: 10000*(1+0.06)^30+6000*(((1+0.06)^30-1)/0.06) This calculates out to 531784.029 JavaScript…
1
vote
1 answer

Vehicle Rental Rate Calculation

Trying with the booking and vehicle rental calculation. Calendar should disable already booked date (Done - used datepicker beforeShowDay:) For Weekends, Friday and Monday should select for collection and return (Done - ) Now comes the calculation…
J.K
  • 1,350
  • 1
  • 11
  • 26
1
2 3 4 5 6 7