I'm a beginner when it comes to JavaScript and I need help setting a maximum value of 50% of the selling price. Can someone offer guidance?
The fields I have are called "sale_price" and "discount".
click here for image description
What is the best way to use JavaScript to limit and adjust the discount amount so that it never exceeds 50% of the selling price?