I am working in asp.net and have a text box txtRateOfPay and a dropdown list ddlPayInterval. There is a label on which yearly salary will be calculated lblSalary. Dropdown can contain values: Hour, Week, Month, Year, Pay Period. And when I write 1 in txtRateOfPay, lblSalary must get updated as 2080 if I selected Hour from ddl.
Formula is: If Hour is selected from ddl, then one week will have 40 hours and one year will have 52 weeks so the yearly salary is 2080.
Can anyone tell me how can I achieve this using javascript/jQuery?
I want that label to be updated when user is entering data in textbox, NOT on blur of textbox or ddl.
Thanks in advance.
You can use
onkeypressevent fortextboxandonchangeevent forDropdownlist