Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8

Thread: Order Form Help

  1. #1
    New Coder
    Join Date
    Sep 2007
    Posts
    17
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Unhappy Order Form Help

    Hello guys,
    please help me in building an order form, the details.
    The order form consist of text box product quantity, unit price, total price, sub total price, tax, discount, grand total quantity and grand total price.
    There are 8 products so there will be 8 product quantity, unit price, total price text boxes. When a user enter the product quantity and unit price, the total price column should be automatically calculated e.g. if product quantity is 8, unit price is 2 then the total price should come to 16. The sub total price will be automatically calculated which should be the addition of all total prices so as the product quantity. The user will enter the tax and discount amount which should be calculated as percentage. Tax will be added to sub total and discount will be subtracted from sub total and then the total price will be displayed in the grand total text box.

    Please help me to develop this form.

    Thank You

  • #2
    Senior Coder
    Join Date
    Jan 2011
    Location
    Missouri
    Posts
    4,683
    Thanks
    25
    Thanked 656 Times in 655 Posts
    I would like to take a couple of days to program this for you, but I don't have that time. If YOU code this and have problems I would help you solve them, but I NEED TO SEE THE CODE.

    Google 'forms html' to learn how to make them. Check javascript for math and 'onchange'.

    Then ask for help OR offer to pay some one to do it for you.

    To others: I'm not being hard on skumar_96. I looked at all of his posts. None have code but do ask for us to write code for him. I think he should offer money to have one of us code for him.

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Location
    Flint, Michigan, USA
    Posts
    632
    Thanks
    1
    Thanked 21 Times in 21 Posts
    This looks like homework:
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
      <head>
    
        <title>Order Form</title>
    
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta http-equiv="Content-Script-Type" content="text/javascript" />
        <meta http-equiv="Content-Style-Type" content="text/css" />
        <meta http-equiv="Content-Language" content="en-US" />
        <meta name="Author" content="James Alarie - jalarie@umich.edu" />
        <meta name="description" content="Order form." />
        <meta name="keywords" content="order,form" />
        
        <link rev="made" href="mailto:jalarie@umich.edu" />
    <!--
    http://www.codingforums.com/showthread.php?t=240497
    Hello guys,
    please help me in building an order form, the details. 
    The order form consist of text box product quantity, unit price, total price, 
    sub total price, tax, discount, grand total quantity and grand total price.
    There are 8 products so there will be 8 product quantity, unit price, total 
    price text boxes. When a user enter the product quantity and unit price, the 
    total price column should be automatically calculated e.g. if product quantity
    is 8, unit price is 2 then the total price should come to 16. The sub total 
    price will be automatically calculated which should be the addition of all 
    total prices so as the product quantity. The user will enter the tax and 
    discount amount which should be calculated as percentage. Tax will be added to
    sub total and discount will be subtracted from sub total and then the total 
    price will be displayed in the grand total text box. 
    Please help me to develop this form.
    Thank You
    -->
        
    <!--
        Author:    James Alarie
        Company:   -independent-
        Address:   3391 N Genesee Rd
                   Flint  MI  48506
                   Latitude: 42.9663  Longitude: -83.7769
        Telephone: +1-810-736-8259
        Fax:       -none-
        Web Site:  http://spruce.flint.umich.edu/~jalarie/
        E-Mail:    jalarie@umich.edu
        Comments:  Having said that, I've probably told you more than I know.
    -->
    
        <style type="text/css">
          /*<![CDATA[*/
    
      #header h1 {
        text-align: center;
        text-shadow: 1px 1px 0px aqua;                  /* horizontal offset, vertical, fuzziness */
      }
      .body1 {
        background-color: #cccc99;
      }
      .center {
        text-align: center;
      }
      .center > form {
        display: table;
        margin: 0px auto;
      }
    
      .THead {
        background-color: yellow;
      }
      .TBody {
        background-color: aqua;
      }
      .Totals {
        background-color: lime;
      }
    
          /*]]>*/
        </style>
        
        <script type="text/javascript" src="style1.js"></script>
        <script type="text/javascript">
          /*<![CDATA[*/
    
      function CalcIt() {
        f1=document.forms[0];                           // abbreviation
        I1Q=f1.Item1Q.value;
        I1UP=f1.Item1UP.value;
        I1TP=I1Q*I1UP;
        I1TP=Math.round(I1TP*100)/100;
          f1.Item1TP.value=I1TP;
        I2Q=f1.Item2Q.value;
        I2UP=f1.Item2UP.value;
        I2TP=I2Q*I2UP;
        I2TP=Math.round(I2TP*100)/100;
          f1.Item2TP.value=I2TP;
        I3Q=f1.Item3Q.value;
        I3UP=f1.Item3UP.value;
        I3TP=I3Q*I3UP;
        I3TP=Math.round(I3TP*100)/100;
          f1.Item3TP.value=I3TP;
        I4Q=f1.Item4Q.value;
        I4UP=f1.Item4UP.value;
        I4TP=I4Q*I4UP;
        I4TP=Math.round(I4TP*100)/100;
          f1.Item4TP.value=I4TP;
        I5Q=f1.Item5Q.value;
        I5UP=f1.Item5UP.value;
        I5TP=I5Q*I5UP;
        I5TP=Math.round(I5TP*100)/100;
          f1.Item5TP.value=I5TP;
        I6Q=f1.Item6Q.value;
        I6UP=f1.Item6UP.value;
        I6TP=I6Q*I6UP;
        I6TP=Math.round(I6TP*100)/100;
          f1.Item6TP.value=I6TP;
        I7Q=f1.Item7Q.value;
        I7UP=f1.Item7UP.value;
        I7TP=I7Q*I7UP;
        I7TP=Math.round(I7TP*100)/100;
          f1.Item7TP.value=I7TP;
        I8Q=f1.Item8Q.value;
        I8UP=f1.Item8UP.value;
        I8TP=I8Q*I8UP;
        I8TP=Math.round(I8TP*100)/100;
          f1.Item8TP.value=I8TP;
        ISTQ=I1Q*1+I2Q*1+I3Q*1+I4Q*1+I5Q*1+I6Q*1+I7Q*1+I8Q*1;
          f1.STQ.value=ISTQ;
        ISTTP=I1TP*1+I2TP*1+I3TP*1+I4TP*1+I5TP*1+I6TP*1+I7TP*1+I8TP*1;
          f1.STTP.value=ISTTP;
        ITaxP=f1.TaxP.value;
        ITaxT=ISTTP*ITaxP/100;
        ITaxT=Math.round(ITaxT*100)/100;
          f1.TaxT.value=ITaxT;
        IDiscountP=f1.DiscountP.value;
        IDiscountT=(ISTTP*1+ITaxT*1)*IDiscountP/100;
        IDiscountT=Math.round(IDiscountT*100)/100;
          f1.DiscountT.value=IDiscountT;
        IGrandQ=ISTQ;
          f1.GrandQ.value=IGrandQ;
        IGrandT=ISTTP*1+ITaxT*1-IDiscountT;
          f1.GrandT.value=IGrandT;
        return false;
      } // CalcIt
    
          /*]]>*/
        </script>
    
      </head>
    
      <body class="body1">
       <div id="body">
    <!-- Page Header -->
        <div id="header">
          <h1>Order Form</h1>
          <hr />
        </div>
    
    <!-- Content -->
        <div id="content">
          <br />
          <noscript>
            <p class="notice">
              You must have scripting enabled to make full use of this page.
            </p>
          </noscript>
          
          <div class="center">
            <form method="post" action="javascript:void(0);">
             <div class="form">
              <table border="1" cellspacing="2" cellpadding="2"
                  summary="This table is used for layout purposes only.">
                <thead class="THead">
                  <tr>
                    <th>Description</th>
                    <th>Quantity</th>
                    <th>Unit Price</th>
                    <th>Total Price</th>
                  </tr>
                </thead>
                <tbody class="TBody">
                  <tr>
                    <td>Item 1</td>
                    <td>
                      <input type="text" size="20" value="0" name="Item1Q" id="Item1Q" alt="Item 1 Quantity" onfocus="this.select();" onchange="CalcIt();" />
                    </td>
                    <td>
                      <input type="text" size="20" value="0" name="Item1UP" id="Item1UP" alt="Item 1 Unit Price" onfocus="this.select();" onchange="CalcIt();" />
                    </td>
                    <td>
                      <input type="text" size="20" value="0" name="Item1TP" id="Item1TP" alt="Item 1 Total Price" onfocus="this.select();" />
                    </td>
                  </tr>
                  <tr>
                    <td>Item 2</td>
                    <td>
                      <input type="text" size="20" value="0" name="Item2Q" id="Item2Q" alt="Item 2 Quantity" onfocus="this.select();" onchange="CalcIt();" />
                    </td>
                    <td>
                      <input type="text" size="20" value="0" name="Item2UP" id="Item2UP" alt="Item 2 Unit Price" onfocus="this.select();" onchange="CalcIt();" />
                    </td>
                    <td>
                      <input type="text" size="20" value="0" name="Item2TP" id="Item2TP" alt="Item 2 Total Price" onfocus="this.select();" />
                    </td>
                  </tr>
                  <tr>
                    <td>Item 3</td>
                    <td>
                      <input type="text" size="20" value="0" name="Item3Q" id="Item3Q" alt="Item 3 Quantity" onfocus="this.select();" onchange="CalcIt();" />
                    </td>
                    <td>
                      <input type="text" size="20" value="0" name="Item3UP" id="Item3UP" alt="Item 3 Unit Price" onfocus="this.select();" onchange="CalcIt();" />
                    </td>
                    <td>
                      <input type="text" size="20" value="0" name="Item3TP" id="Item3TP" alt="Item 3 Total Price" onfocus="this.select();" />
                    </td>
                  </tr>
                  <tr>
                    <td>Item 4</td>
                    <td>
                      <input type="text" size="20" value="0" name="Item4Q" id="Item4Q" alt="Item 4 Quantity" onfocus="this.select();" onchange="CalcIt();" />
                    </td>
                    <td>
                      <input type="text" size="20" value="0" name="Item4UP" id="Item4UP" alt="Item 4 Unit Price" onfocus="this.select();" onchange="CalcIt();" />
                    </td>
                    <td>
                      <input type="text" size="20" value="0" name="Item4TP" id="Item4TP" alt="Item 4 Total Price" onfocus="this.select();" />
                    </td>
                  </tr>
                  <tr>
                    <td>Item 5</td>
                    <td>
                      <input type="text" size="20" value="0" name="Item5Q" id="Item5Q" alt="Item 5 Quantity" onfocus="this.select();" onchange="CalcIt();" />
                    </td>
                    <td>
                      <input type="text" size="20" value="0" name="Item5UP" id="Item5UP" alt="Item 5 Unit Price" onfocus="this.select();" onchange="CalcIt();" />
                    </td>
                    <td>
                      <input type="text" size="20" value="0" name="Item5TP" id="Item5TP" alt="Item 5 Total Price" onfocus="this.select();" />
                    </td>
                  </tr>
                  <tr>
                    <td>Item 6</td>
                    <td>
                      <input type="text" size="20" value="0" name="Item6Q" id="Item6Q" alt="Item 6 Quantity" onfocus="this.select();" onchange="CalcIt();" />
                    </td>
                    <td>
                      <input type="text" size="20" value="0" name="Item6UP" id="Item6UP" alt="Item 6 Unit Price" onfocus="this.select();" onchange="CalcIt();" />
                    </td>
                    <td>
                      <input type="text" size="20" value="0" name="Item6TP" id="Item6TP" alt="Item 6 Total Price" onfocus="this.select();" />
                    </td>
                  </tr>
                  <tr>
                    <td>Item 7</td>
                    <td>
                      <input type="text" size="20" value="0" name="Item7Q" id="Item7Q" alt="Item 7 Quantity" onfocus="this.select();" onchange="CalcIt();" />
                    </td>
                    <td>
                      <input type="text" size="20" value="0" name="Item7UP" id="Item7UP" alt="Item 7 Unit Price" onfocus="this.select();" onchange="CalcIt();" />
                    </td>
                    <td>
                      <input type="text" size="20" value="0" name="Item7TP" id="Item7TP" alt="Item 7 Total Price" onfocus="this.select();" />
                    </td>
                  </tr>
                  <tr>
                    <td>Item 8</td>
                    <td>
                      <input type="text" size="20" value="0" name="Item8Q" id="Item8Q" alt="Item 8 Quantity" onfocus="this.select();" onchange="CalcIt();" />
                    </td>
                    <td>
                      <input type="text" size="20" value="0" name="Item8UP" id="Item8UP" alt="Item 8 Unit Price" onfocus="this.select();" onchange="CalcIt();" />
                    </td>
                    <td>
                      <input type="text" size="20" value="0" name="Item8TP" id="Item8TP" alt="Item 8 Total Price" onfocus="this.select();" />
                    </td>
                  </tr>
                  <tr class="Totals">
                    <td>Sub Totals</td>
                    <td>
                      <input type="text" size="20" value="0" name="STQ" id="STQ" alt="Sub Total Quantity" onfocus="this.select();" />
                    </td>
                    <td>&nbsp;</td>
                    <td>
                      <input type="text" size="20" value="0" name="STTP" id="STTP" alt="Sub Total Total Price" onfocus="this.select();" />
                    </td>
                  </tr>
                  <tr class="Totals">
                    <td>Tax Percentage</td>
                    <td colspan="2">
                      <input type="text" size="20" value="0" name="TaxP" id="TaxP" alt="Tax Percentage" onfocus="this.select();" onchange="CalcIt();" />
                    </td>
                    <td>
                      <input type="text" size="20" value="0" name="TaxT" id="TaxT" alt="Tax Total" onfocus="this.select();" />
                    </td>
                  </tr>
                  <tr class="Totals">
                    <td>Discount Percentage</td>
                    <td colspan="2">
                      <input type="text" size="20" value="0" name="DiscountP" id="DiscountP" alt="Discount Percentage" onfocus="this.select();" onchange="CalcIt();" />
                    </td>
                    <td>
                      <input type="text" size="20" value="0" name="DiscountT" id="DiscountT" alt="Discount Total" onfocus="this.select();" />
                    </td>
                  </tr>
                  <tr class="Totals">
                    <td>Grand Total</td>
                    <td>
                      <input type="text" size="20" value="0" name="GrandQ" id="GrandQ" alt="Grand Total Quantity" onfocus="this.select();" />
                    </td>
                    <td>&nbsp;</td>
                    <td>
                      <input type="text" size="20" value="0" name="GrandT" id="GrandT" alt="Grand Total" onfocus="this.select();" />
                    </td>
                  </tr>
                </tbody>
              </table>
              <input type="reset" value="Reset" title="Reset" />&nbsp; 
             </div><!-- form -->
            </form>
            
          </div><!-- center -->
      
        </div>
      
    <!-- Page Footer -->
        <div id="footer">
          <br clear="all" /><hr />
          Written on October 10, 2011, by:&nbsp;
          <a href="mailto:jalarie@umich.edu">James Alarie</a>.
        </div>
    
       </div>
      </body>
    
    </html>

  • Users who have thanked jalarie for this post:

    skumar_96 (10-10-2011)

  • #4
    New Coder
    Join Date
    Sep 2007
    Posts
    17
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Hello Mr. Sunfighter,
    thank you for your valuable reply. I am asking help, if i would be paying then that is not help and moreover due to restrictions i can't post the code here. Anyway thank you for your reply. Better i find some one else.

    Thank you

  • #5
    New Coder
    Join Date
    Sep 2007
    Posts
    17
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Hello jalarie,
    thanks a ton for helping me out, tell me what can i do for you. You did the job for me.

    Thanks Thanks Thanks

  • #6
    New Coder
    Join Date
    Sep 2007
    Posts
    17
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Hello jalarie,
    thanks a ton for helping me out, tell me what can i do for you. You did the job for me.

    Thanks Thanks Thanks

  • #7
    Regular Coder
    Join Date
    Jun 2002
    Location
    Flint, Michigan, USA
    Posts
    632
    Thanks
    1
    Thanked 21 Times in 21 Posts
    Quote Originally Posted by skumar_96 View Post
    Hello jalarie,
    thanks a ton for helping me out, tell me what can i do for you. You did the job for me.

    Thanks Thanks Thanks
    1. Tell me where you are. It looks like somewhere near London.
    2. Cash is always nice, but you've already said no to that, and I wouldn't know what to do with pounds and pence anyway.
    3. I don't know what you have to offer. And actually asking for anything in this forum is probably banned.

  • #8
    Senior Coder
    Join Date
    Jan 2011
    Location
    Missouri
    Posts
    4,683
    Thanks
    25
    Thanked 656 Times in 655 Posts
    Quote Originally Posted by skumar_96 View Post
    Hello Mr. Sunfighter,
    thank you for your valuable reply. I am asking help, if i would be paying then that is not help and moreover due to restrictions i can't post the code here. Anyway thank you for your reply. Better i find some one else.

    Thank you
    What restrictions are you talking about?


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •