Giter Site home page Giter Site logo

pursuit-core-web-form-and-queue's Introduction

DOM Forms Review Practice

Steps

  1. Use starter.html as a starting point. Add an HTML Form that resembles the screenshot.

  2. Add a script that waits for the DOM and handles the form submission.

    • When the form is submitted create an object with the information that the user entered. This object represents a pizza order and looks like this. Your object should use the same key names:
    let order = {
      first_name: "Jhon",
      last_name: "Snow",
      address: "1234 Main St, 2nd Fl, Hometown",
      size: "small",
      crust: "thick",
      topping: [
        "1",
        "2",
        "4",
        "8"
      ],
      special_instructions: "No Cheese"
    }
    • Enqueue the order object into a Queue instance. Use the Queue class definition seen in here
  3. Add JavaScript that handles the Dequeue button.

  4. Note the script in the head <script src="enableDOMQueue.js" ></script> has a function that will enable your Queue to display in the DOM. You must call the function enableDOMQueue(yourQueue) in the last line inside your event listener for "DOMContentLoaded"

  5. Note Toppings values are like so:

  1 = Anchovies
  2 = Ham
  3 = Pepperoni
  4 = Sausage
  5 = Broccoli
  6 = Green Olives
  7 = Mushrooms
  8 = Roasted Garlic

Screenshots

pizza ordering app screenshots

Enqueueing

adding pizza to queue

Dequeueing

removing pizza to queue

pursuit-core-web-form-and-queue's People

Contributors

alejo4373 avatar aminescodes avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.