Question: Hello, How would I set up the HTML code below, specifically the placeholders as elements with an assigned id attribute. I am able to get

Hello,

How would I set up the HTML code below, specifically the placeholders as elements with an assigned id attribute. I am able to get the form to dynamicaly prefill, but I am supposed to include the elements in place of the placeholders in the

of the . I have included both the HTML and javascript code below:

HTML:

Invitation Page

CapellaVolunteers.org

Hello recipientName!

You have been invited to volunteer for an event held by organizationName on eventDate. Please come to the following website: websiteURL to sign up as a volunteer.

Thanks!

hostName
This events site is for IT-FP3215 tasks.

Javascript from external file location:

function create_invitation() //Function to replace placeholders in invitation { // Variable RecipientName to store value of recipientName from form var RecipientName = document.getElementById("recipientName_form").value; document.getElementById("recipientName").innerHTML= RecipientName ;

// Variable OrganizationName to store value of organizationName from form var OrganizationName= document.getElementById("organizationName_form").value; document.getElementById("organizationName").innerHTML= OrganizationName ;

// Variable EventDate to store value of eventDate from form var EventDate = document.getElementById("eventDate_form").value; document.getElementById("eventDate").innerHTML= EventDate ;

// Variable WebsiteURL to store value of websiteURL from form var WebsiteURL = document.getElementById("websiteURL_form").value; document.getElementById("websiteURL").innerHTML= WebsiteURL ;

// Variable HostName to store value of hostName from form var HostName = document.getElementById("hostName_form").value; document.getElementById("hostName").innerHTML= HostName ;

return false; } function UserInput() { var RecipientName = document.getElementById("RecipientName"); alert(RecipientName); var OrganizationName = document.getElementById("OrganizationName"); alert(OrganizationName); var EventDate = document.getElementById("EventDate"); alert(EventDate); var WebsiteURL = document.getElementById("WebsiteURL"); alert(WebsiteURL); var HostName = document.getElementById("HostName"); alert(HostName); }

Thanks,

Annette

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!