Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In this assignment, use the Web page called invitation.html found in the Required Resources (in the zip file called IT-FP3215.zip)to add functionality to an interactive

In this assignment, use the Web page called "invitation.html" found in the Required Resources (in the zip file called IT-FP3215.zip)to add functionality to an interactive form that generates an invitation to volunteers for an event. The file will have the following invitation message placeholder and a form below it. You will add JavaScript functionality to the form that will allow a user to dynamically fill out the invitation.

Hello __recipientName_____!

You have been invited to volunteer for an event held on July 1st. Please respond to this email to sign up as a volunteer.

Thanks!

___hostName___

Hints:The placeholders (for example the recipientName) will need to be set up aselements with an assigned id attribute. Prompt the user to enter in the recipients name, and host name (Your name). Using JavaScript, replace those elements dynamically with what the user has entered in the form.Use the forms input fields (once submitted) to store the values to JavaScript variables. Then manipulate the DOM to replace theelement content dynamically.

To get you started, in your .js file, you need to first declare the variable names such as:

var myRecipientName;

Then, you would need to set the variable to the input fields value:

myRecipientName = document.getElementById(recipientNameInput).value;

Next, you would then need to set the innerHTML of the span element of the corresponding name like:

document.getElementById(recipientNamePlaceholder).innerHTML = myRecipientName;

Note on your submit button, a JavaScript event handler has been defined on the submit of the form. Notice that it has a return false to prevent the form from actually submitting.

Hint:See what happens when you remove the return false from the JavaScript code.

Tip:Variable names cannot include any special characters or spaces. They cannot start with a number. They also cannot be any of JavaScripts reserved words. Remember as well that JavaScript is case sensitive.

Preparation

Download and unzip the IT-FP3215.zip file found in the Required Resources. Itcontains the initial framework for the site. All of the HTML files are located in the root directory. Images are placed in the images subdirectory;CSS files are placed under the css subdirectory. Your JavaScript external files should be placed under the js subdirector. When you submit your work, be sure to zip up the entire folder, including all of the ancillary files such as the images, CSS, and JavaScript code.

Note:This course requires you to use a text editor to complete your work. There are many free open source options on the Internet from which you may choose. See the Suggested Resources for links to free, open source text editors.

Directions

Read the Overview.Use the invitation.html file in the Resources as a template for completing this assessment.

Write JavaScript that enables the invitation to be dynamically completed using the form.Make sure to do each of the following:

Declare variables to store the input field data.Store the input field data into the variables on form submit.Manipulate the DOM to replace placeholder data with the variables.Write developer comments to describe the variables being declared and explain the functions and logical blocks of JavaScript code.Once completed, view your pages in each of your two selected Web browsers to see if the content renders appropriately and consistently within each.Next, verify that your code is error-free using the appropriate browser-specific development tool found in the Resources.Take a screen capture of each of your validation results and save it for submission.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Pro PowerShell For Database Developers

Authors: Bryan P Cafferky

1st Edition

1484205413, 9781484205419

More Books

Students also viewed these Databases questions

Question

Describe the economic model that is proposed for the operation.

Answered: 1 week ago

Question

What is DDL?

Answered: 1 week ago