Question

In: Computer Science

PRG/280 Week Three Assignment – Input Types and Form Designation Based on the readings for this...

PRG/280 Week Three Assignment – Input Types and Form Designation

  1. Based on the readings for this week, list the input types supported in HTML in general, and input types supported only in HTML5.
  1. HTML Input Types
      1. HTML5 Input Types
        1.   
    1. Study the HTML code snippet that appears below and answer these questions:
      1. Based on the code below, where will this form be sent after the user clicks the Submit button?
      2. How would the HTML code need to be changed if you wanted the contents of the form to be sent to [email protected] after the user clicks the Submit button? Give the entire new HTML statement that would be required to do this.

    <!DOCTYPE html>

    <html>

    <head>

    <link rel="stylesheet" href="MyStyle.css">

    </head>

    <body>

    <nav>

                <a href="GroceryHome.html">Home</a> |

                <a href="Products.html">Products</a> |

                <a href="AboutUs.html">About Us</a> |

                <a href="Contact.html">Contact</a>

    </nav>

    <header>

         <h1> My Contact Page</h1>

    </header>

    <article>

    Thank you for your interest in our grocery store. We offer delivery or call-ahead pickup services. Please provide your contact information, and indicate your family's food preferences.

    </article> <p>

    <form action="#" method="post" id="form1">

    <div class="div1">

    <label for="fname1" >First Name:</label><br>

    <input type="text" name="firstname1" id="fname1"><br>

    <label for="lname1" >Last Name:</label><br>

    <input type="text" name="lastname1" id="lname1"><br>

    <label for="phone1" >Phone (i.e. 123-456-7890):</label><br>

    <input type="text" name="phone1" id="phone1" placeholder="123-456-7890" ><br>

    <label for="email1" >Email:</label><br>

    <input type="text" name="email1" id="email1" placeholder="abc@xyz"><br>

    <label for="contactpreference1" >Prefered contact method?</label><br>

    <input type="radio" name="contactpreference1" value="phone" checked> Phone

    <input type="radio" name="contactpreference1" value="email"> Email

    <br><br>

    <input type="submit" id="Submit1" value="Submit" onclick=" validateMyPage()" />

    </div>

    </form>

    Solutions

    Expert Solution

    I) HTML Input Types:

    syntax: <input type='type'>

    • button
    • checkbox
    • color
    • date
    • datetime-local
    • email
    • file
    • hidden
    • image
    • month
    • number
    • password
    • radio
    • range
    • reset
    • search
    • submit
    • tel
    • text
    • time
    • url
    • week

    A) HTML5 Input Types:

    • color
    • date
    • datetime-local
    • email
    • month
    • number
    • range
    • search
    • tel
    • time
    • url
    • week

    Answers for HTML code snippet Questions:

    a) The form is sent to the same page, which then processes the data etc.

    b) we have to change form action to ='MAILTO:[email protected]'

    Here is the new whole HTML:

    <!DOCTYPE html>
    <html>
    <head>
    <link rel="stylesheet" href="MyStyle.css">
    </head>
    <body>
    <nav>
    <a href="GroceryHome.html">Home</a> |
    <a href="Products.html">Products</a> |
    <a href="AboutUs.html">About Us</a> |
    <a href="Contact.html">Contact</a>
    </nav>
    <header>
    <h1> My Contact Page</h1>
    </header>
    <article>
    Thank you for your interest in our grocery store. We offer delivery or call-ahead pickup services. Please provide your contact information, and indicate your family's food preferences.
    </article>
    <p>
    <form action="MAILTO:[email protected]" method="post" id="form1">
    <div class="div1">
    <label for="fname1">First Name:</label><br>
    <input type="text" name="firstname1" id="fname1"><br>
    <label for="lname1">Last Name:</label><br>
    <input type="text" name="lastname1" id="lname1"><br>
    <label for="phone1">Phone (i.e. 123-456-7890):</label><br>
    <input type="text" name="phone1" id="phone1" placeholder="123-456-7890"><br>
    <label for="email1">Email:</label><br>
    <input type="text" name="email1" id="email1" placeholder="abc@xyz"><br>
    <label for="contactpreference1">Prefered contact method?</label><br>
    <input type="radio" name="contactpreference1" value="phone" checked> Phone
    <input type="radio" name="contactpreference1" value="email"> Email
    <br><br>
    <input type="submit" id="Submit1" value="Submit" onclick=" validateMyPage()" />
    </div>
    </form>

      

      


    Related Solutions

    PRG/280 Week Two Assignment: Adding Navigation and CSS This assignment walks you through the steps of...
    PRG/280 Week Two Assignment: Adding Navigation and CSS This assignment walks you through the steps of adding one more page to your website and writing navigation (i.e., adding hyperlinks) between the two pages. The starting point will be the GroceryHome.html page from Week One. Hint: Copy the GroceryHome.html file to a new folder (suggested name for the folder: Week_2_Assignment) for Week Two. Step 1) First, modify the Week Two GroceryHome.html page to add the navigation. After the opening <body> tag,...
    Based on the readings for the week, would you say that Steve Jobs was an ethical...
    Based on the readings for the week, would you say that Steve Jobs was an ethical leader? State your rationale. Are you an Acolyte or a Rejector? Why? Respond to the observations of at least two of your peers for this post.
    Based on the assigned readings during Week 1 and 2 in The Blue Sweater, what are...
    Based on the assigned readings during Week 1 and 2 in The Blue Sweater, what are the important components of social entrepreneurship according to the author's model? Jacqueline Novogratz argues that success and failure go together and teach us how to succeed. Discuss some of the "failures" or important learning experiences Jacqueline encountered. If you use a quote from The Blue Sweater in your post, you may use an abridged citation: (Novogratz, p. #).
    describe the three types of neurons based on their structure. describe three types of neurons based...
    describe the three types of neurons based on their structure. describe three types of neurons based on their functions.
    Assignment 2: Constructive Dividends Based on your readings for the module, respond to the following: Explain...
    Assignment 2: Constructive Dividends Based on your readings for the module, respond to the following: Explain the concept of constructive dividends. Give examples. Construct three original examples of situations in which the IRS might claim constructive dividends. Suggest ways to ensure that constructive dividends are minimized or eliminated. Write a three- to five-page paper in MS Word format. Apply APA standards for writing style to your work.
    WEEK 1 HOMEWORK (based on your week 1 assignment) Please answer the following questions in complete...
    WEEK 1 HOMEWORK (based on your week 1 assignment) Please answer the following questions in complete sentences. Identify and define at least 5 fallacies about racism. What areas of life does racism affect? Define the two types of racism (institutional and interpersonal). What is symbolic violence when it comes to race? At one time Jews dominated basketball; now it is a game almost exclusively for African Americans. The text authors identify at least two reasons why both of these groups...
    Module/Week 2 ASSIGNMENT (INPUT/OUTPUT) The number of permutations of a set of n items taken r...
    Module/Week 2 ASSIGNMENT (INPUT/OUTPUT) The number of permutations of a set of n items taken r at a time is given by the following formulan!/r !(n- r )!: where n! is the factorial of n, r! is the factorial of r, and (n-r)! is the factorial of the result of n-r. The factorial of a number n can be solved using the following formula: n!=e-n nn √ 2πn. If there are 18 people in your class and you want to...
    Identify three ways to deal with stress based on your readings.  discuss how you personally deal with...
    Identify three ways to deal with stress based on your readings.  discuss how you personally deal with stress. write at least 250 word
    Write down the regression model form with two quantitative inputs and one qualitative input with three...
    Write down the regression model form with two quantitative inputs and one qualitative input with three discrete levels. For each discrete level, we wish to have a complete second order model of the quantitative variables.
    Describe the results and conclusions around weak form efficiency based on the following types of studies:...
    Describe the results and conclusions around weak form efficiency based on the following types of studies: a. Returns over short horizons. b. Returns over long horizons.
    ADVERTISEMENT
    ADVERTISEMENT
    ADVERTISEMENT