Need to calculate total cost

Discussion in 'JavaScript' started by PabloCustodio, Dec 25, 2009.

  1. #1
    Hi everyone,

    I am not a programmer!!! I need help and have searched the net for an answer. I was hoping that someone could help me out with some coding in Javascript.

    I have a form: http://www.digitalimagesbypablo.com/wedding_contract_info1.htm

    I would like the customer to be able to see their total cost by selecting the additional services and products the want added.

    Basically, I start at a base of $750 and everything they select will be added to the base ($750) to give them a total. However, each time they add something, I would like the total cost to reflect what they choose each time. This way the customer can see what the total cost would be each time they add a product or service.

    I provided a link to the webpage so you would have an idea as to what I'm trying to accomplish.

    I am in Survival mode because of the economy and any and all help would be highly and greatly appreciated.
     
    PabloCustodio, Dec 25, 2009 IP
  2. s_ruben

    s_ruben Active Member

    Messages:
    735
    Likes Received:
    26
    Best Answers:
    1
    Trophy Points:
    78
    #2
    If you are not a programmer I think it will be very difficult to help you by writing here!! If you allow me to access the code I will do that!!
     
    s_ruben, Dec 26, 2009 IP
  3. PabloCustodio

    PabloCustodio Guest

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Below is part of the top part of the form code Form code:



    <td class="SmlText">Additional Products?<br> <select id="Additional Products" name="Additional Products" size="1">
    <option>None</option>
    <option value="10x10 Flush Mount Album $449.00">10x10
    Flush Mount Album $449.00</option>
    <option value="12x12 Flush Mount Album $499.00">12x12
    Flush Mount Album $499.00</option>
    <option value="11x8.5 Storybook $189.95">11x8.5 Story
    Book $189.95</option>
    <option value="12x12 Story Book $259.95">12x12 Story
    Book $259.95</option>
    <option value="High Res Photo CD (All Photos) $250.00">High
    Res Photo CD (All Photos) $250.00</option>
    <option value="DVD Photo Slideshow $45.00">DVD Photo
    Slideshow $45.00</option>
    </select> </td>
    <td class="SmlText">&nbsp;</td>
    <td class="SmlText">Additional Time?<br> <select id="select" name="select" size="1">
    <option>None</option>
    <option>1 additional hour -- $100</option>
    <option>2 additional hours -- $200</option>
    <option>3 additional hours -- $300</option>
    <option>4 additional hours -- $400</option>
    <option>5 additional hours -- $375</option>
    <option>6 additional hours -- $450</option>
    <option>Up to 8 hours -- $600</option>
    <option>Upto 10 hours -- $700</option>
    </select> </td>
    </tr>
    <tr>
    <td class="SmlText">&nbsp;</td>
    <td class="SmlText">&nbsp;</td>
    <td class="SmlText">&nbsp;</td>
    </tr>
    <tr>
    <td class="SmlText">Additional Photographer?<br> <select id="select2" name="select2" size="1">
    <option>2-hour minimum </option>
    <option>None</option>
    <option>2 additional hours -- $200</option>
    <option>3 additional hours -- $300</option>
    <option>4 additional hours -- $400</option>
    <option>5 additional hours -- $500</option>
    <option>6 additional hours -- $600</option>
    </select> </td>
    <td class="SmlText">&nbsp;</td>
    <td class="SmlText">Additional Prints?<br> <select id="select3" name="select3" size="1">
    <option>Additional Print Sizes available</option>
    <option>None</option>
    <option>4x6 Prints --- $3.00</option>
    <option>5x7 Prints --- $5.00</option>
    <option>8x10 Prints --- $6.00</option>
    <option>11x14 Print --- $10.00</option>
    <option>16x20 Print --- $20.00</option>
    </select></td>
    </tr>
    <tr>
    <td class="SmlText">&nbsp;</td>
    <td class="SmlText">&nbsp;</td>
    <td class="SmlText">&nbsp;</td>
    </tr>
    <tr>
    <td class="SmlText">Your Total Cost<br><input type="text" name="textfield"></td>
    <td class="SmlText">&nbsp;</td>
    <td class="SmlText">&nbsp;</td>


    The coding for the form was done with my hosts 'Form Builder'. However, it doesn't give me anyway to calculate the 'Total Cost' when they select a product or additional services.

    I hope that helps.
     
    PabloCustodio, Dec 26, 2009 IP
  4. PabloCustodio

    PabloCustodio Guest

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    An example: $750 (start base) + additional time cost (if any is chosen) + additional product cost (if any is chosen) + additional photographer cost (if any is chosen) = Total Cost
     
    PabloCustodio, Dec 26, 2009 IP