html - Javascript that validates user entries and then displays any error via pop up box for option forms? -


im having difficult time trying create javascript file validate sample form options , quantities. im trying when person fills out form , theres error, want pop why. if good, typical display summary of items ordered, numbers of each item, cost of each item , total cost.

so in short, if customer orders something, want display show ordered , how total tax.

<!doctype html public "-//w3c//dtd xhtml 1.1//en"         "http://www.w3.org/tr/xhtml11/dtd/xhtml11.dtd">   <html xmlns="http://www.w3.org/1999/xhtml">     <head>             <title>products & services</title>     </head>     <body>         <h1>pc products</h1>      <form action="" name="products" method="post">     <table summary="feedback">     <tr>     <td>processors:    <select name="product1">       <option>select device</option>        <option value="139.99">intel i3 - $140</option>        <option value="189.99">intel i5 - $190</option>        <option value="239.99">intel i7 - $240</option>        </select>      quantity :   <select name="quantity1" >       <option value="1">1</option>       <option value="2">2</option>       <option value="3">3</option>       <option value="4">4</option>       <option value="5">5</option>     </select>     </tr>     </td>          <tr>     <td>storage:    <select name="product2">       <option>select device</option>        <option value="149.99">ssd 128gb - $149.99</option>        <option value="249.99">ssd 256gb - $249.99</option>        <option value="519.00">ssd 512gb - $519.00</option>        <option value="69.99">hdd 500gb - $69.99</option>        <option value="109.99">hdd 1tb - $109.99</option>        <option value="149.99">hdd 1.5tb - $149.99</option>        <option value="199.99">hdd 3tb - $199.99</option>     </select>      quantity :   <select name="quantity2" >       <option value="1">1</option>       <option value="2">2</option>       <option value="3">3</option>       <option value="4">4</option>       <option value="5">5</option>     </select>     </tr>     </td>         <tr>     <td>   memory:    <select name="product3">       <option>select device</option>        <option value="59.99">ddr3 8gb - $59.99</option>        <option value="109.99">ddr3 16gb - $109.99</option>        <option value="209.99">ddr3 32gb - $209.99</option>      </select>     quantity :   <select name="quantity3" >       <option value="1">1</option>       <option value="2">2</option>       <option value="3">3</option>       <option value="4">4</option>       <option value="5">5</option>     </select>     </tr>     </td>          <tr>     <td>graphics card:    <select name="product4">       <option>select device</option>        <option value="139.99">nvidia - $649.99</option>        <option value="189.99">amd - $449.99</option>        </select>      quantity :   <select name="quantity4" >       <option value="1">1</option>       <option value="2">2</option>       <option value="3">3</option>       <option value="4">4</option>       <option value="5">5</option>     </select>     </tr>     </td>     <br />  <table> service , repair   <tr><td><input type="checkbox" name="service" value="99.99">   <td>virus removal</td> <td align="right"><tt>99.99</tt></td></tr> <tr><td><input type="checkbox" name="service" value="29.99">   <td>1 hour computer lessons</td> <td align="right"><tt>29.99</tt></td></tr>   <tr><td><input type="checkbox" name="service" value=49.99">   <td>pc assembly</td> <td align="right"><tt>49.99</tt></td></tr>  </table>     <br />      <h4><i>*sales tax of 8.25% applies</i></h4>     <td>tax exempt check box: <input type="checkbox" name="reply" value="yes" /><br />      <p>     <input type="hidden" id="itemname" name = "itemname" value= "">                 <input type = "submit" value="submit" />                 <input type = "reset" value="clear" />             </p>             </td>             </form>         </body>     </html> 


Comments

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -