Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Create Brand
- <!DOCTYPE html>
- <html>
- <head>
- <title> Nile</title>
- <meta charset="utf-8" />
- <link href="external_Style_sheet.css" rel="stylesheet" />
- </head>
- <body>
- <nav>
- <ul>
- <li> <a href="Default.html"> Home</a></li>
- <li> <a href="CreateItem.html"> Items</a></li>
- <li> <a href="CreateCategory.html"> Categories</a></li>
- </ul>
- <p></p>
- </nav>
- <header> <font size="10" color="purple" font:bold>Nile</font></header>
- <font size="3" color="purple" font:bold> Welcome to the Nile! We are a shopping store online where you can buy everything you could possibly need in one single location. Feel free to browse!</font>
- <p><img src="online shop.jpg" alt="" style="width:304px;height:228px;"></p>
- <table>
- <tr>
- <th><font size="5" color="purple" font:bold>History</th></font>
- </tr>
- <tr>
- <td> <font size="3" color="purple" font:bold>Our company started in 1936 in Smithfield, Pennsylvania. We were a family of four that decided we wanted to open up a store to fit the needs of everyone on the web all over the country.</td></font>
- </tr>
- </table><br />
- <table>
- <tr>
- <th><font size="5" color="purple" font:bold>Owners</th></font>
- </tr>
- <tr>
- <td><font size="3" color="purple" font:bold>This company is owned and operated by Brittani Kiger and my family. We are locally owned and operated, as well.</td></font>
- </tr>
- </table>
- <br />
- <table>
- <tr>
- <th><font size="5" color="purple" font:bold>Contact Us</th></font>
- </tr>
- <tr>
- <td><font size="3" color="purple" font:bold>If you would like to contact us, we can be reached by email at brittani.kiger@gmail.com</td></font>
- </tr>
- </table>
- <br />
- <table>
- <tr>
- <th><font size="5" color="purple" font:bold>Items</th></font>
- </tr>
- <tr>
- <td><font size="3" color="purple" font:bold>We offer many kinds of items that people would be interested in buying.</td></font>
- </tr>
- </table>
- <br />
- Insert Brand Name:
- <form id="brand_input">
- <input id="input" class= "data" type ="text" required />
- <input type="button" onclick="SaveBrand()" value="Save" />
- <input type="button" onclick="BrandOutputArray()" value="Output" />
- <p id="results"></p>
- </form>
- Insert item's total:
- <form id="total_input">
- <input id="Number1" class="data" type = "number" required />
- <input type ="button" onclick="SaveBrand()" value = "Save" />
- <input type ="button" onclick="print_quantity()" value ="Output1" />
- <input type="button" value="Generate Table" onclick="GenerateTable()" />
- <hr />
- <div id="dvTable">
- </div>
- <h2>Brand Name</h2>
- <script>
- var brand;
- var complete_total=0;
- var total_plus_tax = 0;
- var brandArray = [];
- var totalArray =[];
- brandArray.push(["input", "data", "text"]);
- function storeBrand() {
- var brandStuff = document.getElementsByClassName("data");
- for (i = 0; i < brandStuff.length; i++) {
- brandArray.push([brandStuff[i].value, brandStuff[(i + 1)].value, brandStuff[(i + 2)].value]);
- }
- document.getElementById("brand_input").reset();
- localStorage.setItem("brandArray", brandArray);
- }
- function BrandOutputArray() {
- document.getElementByClass("data").innerHTML = localStorage.getItem("brandArray");
- prompt("brandArray");
- }
- totalArray.push(["Number1", "data", "text"]);
- function storeTotal() {
- var totalStuff = document.getElementsByClassName("data");
- for (i = 0; i < totalStuff.length; i++) {
- totalArray.push([totalStuff[i].value, totalStuff[(i + 1)].value, totalStuff[(i + 2)].value]);
- }
- document.getElementById("total_input").reset();
- localStorage.setItem("totalArray", totalArray);
- }
- function BrandOutputArray() {
- document.getElementByClass("data").innerHTML = localStorage.getItem("brandArray");
- prompt("brandArray");
- }
- function quantity() {
- item_price = document.getElementById('Number1').value;
- var item_total = Number(item_price);
- if(item_price >100)
- {
- shipping = 10;
- }
- else
- {
- shipping = 5;
- }
- complete_total = +shipping + +item_total;
- var tax = 0.06;
- total_tax = (+shipping + +item_total) * tax
- total_plus_tax = total_tax + +item_total;
- }
- function print_quantity() {
- quantity();
- alert("<p>The shipping is: $" + shipping);
- alert("<p>Your total will be: $" + complete_total);
- alert("<p>Your total plus tax will be: $" + total_plus_tax);
- }
- var Array[];
- /*function StoreBrand() {
- quantity();
- brandArray.push(document.getElementById("input").value);
- localStorage.setItem("brandArray", brandArray);
- document.getElementById("brand_input").reset();
- totalArray.push(document.getElementById("Number1").value);
- localStorage.setItem("totalArray", totalArray);
- document.getElementById("total_input").reset();
- }
- */
- function SaveBrand() {
- storeBrand();
- document.getElementById("SaveBrand").innerHTML = StoreBrand();
- }
- function GenerateTable() {
- //Build an array containing Customer records.
- var Array = new Array();
- Array.push(["brandArray", "totalArray"]);
- //Create a HTML Table element.
- var table = document.createElement("TABLE");
- table.border = "1";
- //Get the count of columns.
- var columnCount = Array[0].length;
- //Add the header row.
- var row = table.insertRow(-1);
- for (var i = 0; i < columnCount; i++) {
- var headerCell = document.createElement("TH");
- headerCell.innerHTML = Array[0][i];
- row.appendChild(headerCell);
- }
- //Add the data rows.
- for (var i = 1; i < Array.length; i++) {
- row = table.insertRow(-1);
- for (var j = 0; j < columnCount; j++) {
- var cell = row.insertCell(-1);
- cell.innerHTML = Array[i][j];
- }
- }
- var dvTable = document.getElementById("dvTable");
- dvTable.innerHTML = "";
- dvTable.appendChild(table);
- }
- </script>
- </form>
- <footer>
- <p> Created by: Brittani Kiger</p>
- <p>Contact us: brittani.kiger@gmail.com</p>
- </footer>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement