dcsimg
www.webdeveloper.com
Results 1 to 4 of 4

Thread: Javascript Eatery menu

  1. #1
    Join Date
    Nov 2011
    Posts
    145

    Javascript Eatery menu

    I'm in the middle of adding javascript to a table, In order for me to follow that everything is coming together. I want to to be able to see ho things are progressing. i want to be able to click on the send order button so i can view things, I can't seem to figure out the send order button to send it to me email. Can someone tell what I'm doing wrong? Keep in mind. The javascript is not finished in the menu.

    Thanks in advance


    <!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">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>The Charisma Eatery</title>
    <script type="text/javascript">

    var BillFirst = "";
    var BillLast = "";
    var BillEmail = "";

    var BillStreetNumber = "";
    var BillStreetName = "";
    var BillCity = "";
    var BillPostalCode = "";
    var BillPhone = "";
    var BillPhone = "";
    var BillConfirm = 0;


    if(document.form.comments.value == "") {
    missinginfo += "\n - Comments";
    }

    if ((document.form.sendorder.value == "") ||
    (document.form.sendorder.value.('@') == -1) ||
    (document.form.sendorder.value.('.') == -1)) {
    missinginfo += "\n - conquer@mts.net";
    }

    </script>

    </head>

    <body>





    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <table width="1089" align="center" border="1">
    <tr>
    <td colspan="3"><center>
    <h1><B>The Charisma Eatery</B></h1>
    </center></td>
    </tr>
    <tr>

    <td width="442"><center>
    <b>vital information</b>
    </center>
    <table width="412">
    <tbody>
    <tr>
    <td width="121">first name</td>
    <td width="289"><input type="text" size="15" maxlength="50" name="BillFirst"></td>
    </tr>
    <tr>
    <td>last name</td>
    <td><input type="text" size="15" maxlength="50" name="BillLast"></td>
    </tr>
    <tr>
    <td>street number</td>
    <td><input type="text" size="40" maxlength="35" name="BillStreetNumber"></td>
    </tr>
    <tr>
    <td>street name</td>
    <td><input type="text" size="40" maxlength="35" name="BillStreetName"></td>
    </tr>
    <tr>
    <td>city</td>
    <td><input type="text" size="25" maxlength="21" name="BillCity"></td>
    </tr>
    <tr>
    <td>postal code</td>
    <td><input type="text" size="25" maxlength="21" name="BillPostalCode"></td>
    </tr>
    <tr>
    <td>phone number</td>
    <td><input name="BillPhone" size="4" />
    -
    <input name="BillPhone" size="5" /></td>
    </tr>
    <tr>
    <td>email address</td>
    <td><input type="text" size="15" name="BillEmail"></td>
    </tr>
    </tbody>
    </table></td>
    <td width="266" valign="top"><p>&nbsp;</p>
    <p>&nbsp;</p>
    <p><b>comments / special request</b><br />
    <textarea rows="10" cols="35"name="comments" ></textarea>
    </p></td><td width="359" align="right"><table width="325">
    <tbody>
    <tr>
    <th width="144">item</th>
    <th width="75">price</th>
    <th width="92">quantity</th>
    <th width="101">sub-total</th>
    </tr>
    <tr align="middle">
    <td align="left">Hamberger</td>
    <td><input size="7" value="$2.99" /></td>
    <td><input size="3" /></td>
    <td><input size="10" /></td>
    </tr>
    <tr align="middle">
    <td align="left">Cheeseburger</td>
    <td><input size="7" value="$3.99" /></td>
    <td><input size="3" /></td>
    <td><input size="10" /></td>
    </tr>
    <tr align="middle">
    <td align="left">Chicken Burger</td>
    <td><input size="7" value="$4.99" /></td>
    <td><input size="3" /></td>
    <td><input size="10" /></td>
    </tr>
    </tbody>
    </table>
    <table width="324">
    <tbody>
    <tr>
    <th width="124">item</th>
    <th width="42">price</th>
    <th width="72">quantity</th>
    <th width="74">sub-total</th>
    </tr>
    <tr align="middle">
    <td align="left">French Fries</td>
    <td><input size="7" value="$2.99" /></td>
    <td><input size="3" /></td>
    <td><input size="10" /></td>
    </tr>
    <tr align="middle">
    <td align="left"><input type="checkbox" />
    gravy</td>
    <td><input size="7" value="$0.50" /></td>
    <td><input size="3" /></td>
    <td><input size="10" /></td>
    </tr>
    <tr align="middle">
    <td align="left"><input type="checkbox" />
    chilli</td>
    <td><input size="7" value="$1.99" /></td>
    <td><input size="3" /></td>
    <td><input size="10" /></td>
    </tr>
    </tbody>
    </table>
    <table align="right">
    <tbody>
    <tr>
    <td>subtotal</td>
    <td><input size="10" /></td>
    </tr>
    <tr>
    <td>pst</td>
    <td><input size="6" /></td>
    </tr>
    <tr>
    <td>gst</td>
    <td><input size="6" /></td>
    </tr>
    <tr>
    <td>total</td>
    <td><input size="10" /></td>
    </tr>
    <tr>
    <td colspan="2"><input type="button" value="total up order" />
    </td>
    </tr>
    </tbody>
    </table></td>

    </tr>
    <tr>
    <td colspan="3"><hr width="1020" align="center" color="#000000" /></td>
    </tr>
    <tr>
    <td colspan="2"><table>
    <tbody>
    <tr align="middle">
    <td>Payment</td>
    <td>card number</td>
    <td>expiration mm/yy</td>
    </tr>
    <tr align="middle">
    <td><select name="select">
    <option selected="selected">cash</option>
    <option>master card</option>
    <option>visa</option>
    </select></td>
    <td><input /></td>
    <td><select name="select">
    <option selected="selected">01</option>
    <option>02</option>
    <option>03</option>
    <option>04</option>
    <option>05</option>
    <option>06</option>
    <option>07</option>
    <option>08</option>
    <option>09</option>
    <option>10</option>
    <option>11</option>
    <option>12</option>
    </select>
    <select name="select">
    <option selected="selected">03</option>
    <option>04</option>
    <option>05</option>
    <option>06</option>
    <option>07</option>
    <option>08</option>
    <option>09</option>
    </select></td>
    </tr>
    </tbody>
    </table></td>
    <td><table>
    <tbody>
    <tr>
    <td><input type="radio" name="howtoget" /></td>
    <td>pickup</td>
    </tr>
    <tr>
    <td><input type="radio" name="howtoget" /></td>
    <td>delivery</td>
    </tr>
    <tr>
    <td><input type="radio" name="howtoget" /></td>
    <td>eat in</td>
    </tr>
    </tbody>
    </table></td>
    </tr>
    <tr>
    <td colspan="3"><table width="200" align="center" border="0">
    <tr>
    <td><input type="reset" value="clear order" align="right"/>
    <input type="button" value="send order" align="center" /></td>
    </tr>
    </table></td>
    </tr>
    </table>
    <p>&nbsp;</p>
    <p>&nbsp;</p>


    </body>
    </html>

  2. #2
    Join Date
    Jan 2009
    Location
    Insanity
    Posts
    1,131
    Depends on how your sending the email, are you expecting the script on the browser to send the email or do you submit the form to a server and have a serverside send the email?

  3. #3
    Join Date
    Nov 2011
    Posts
    145
    I want it to go direct to my personnel email. Just so I can see how it's working.

  4. #4
    Join Date
    Jan 2009
    Location
    Insanity
    Posts
    1,131
    That still does not answer the question so I will try to rephrase it.

    It depends on "The method" that you use to send the email... Do you post a form, do you send the data via ajax and what serverside processes the request?

    I was not referring to what address you want sent to but more about the underlying method you have used to send email.

    Please note, in future, wrap your code please.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles