Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Dynamic subtotal calculation

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #33674
    skim5_1999
    Member

    Hello – I would love some guidance here. I am trying to create a simple subtotal box that autopopulates quantity and price based on options the user have made. More specifically, if a user selects quantity of “3” and then selects goods that are worth “$30”, then on the same page at the bottom, I’d like for it to dynamically show text as “quantity:3”, “price per product: $30”, and “subtotal: “$90.”
    Here’s the HTML I’ve been working with to select options of quantity and price. Both will have values which will dynamically be populated based on some javascript and PHP written beforehand, hence each only has one option value. Thank you in advance for your help!



    3. Select quantity







    4. Select product





Viewing 1 post (of 1 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.