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
HTML:
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
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started