Skip to content
Advertisement

Couldn’t calculate drop down list select value using jquery

i am creating a simple inventory system using jquery.what is problem is when i calculation products we have a two option GR and KG. if i select as GR it need to be calculation the GR calculation part if i select as KG it need to be calculation the KG calculation part.i ran into the problem with KG is working GR not working what i tried so far i attached along with the image.

Form Design

JavaScript

jQuery

JavaScript

Here

there GR value 1 KG value 2

JavaScript

Advertisement

Answer

JavaScript
JavaScript

what i see its an error when you select the right select for GR or KG:

use $(this).closest("tr").find("select") instead of $("#option"), (you have to have uniq id and you have lot of id option) and no need to use loop function

JavaScript

i dont figure how you calculate…

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement