Question: The below code prints the inputted information on HTML form to an excel file. For Job Responsibilities, it only prints the first inputted value. It

The below code prints the inputted information on HTML form to an excel file. For Job Responsibilities, it only prints the first inputted value. It will not print if I add more than one text field and input information into them using the "Add" button. I want it to print any and all responsibilities inputted by the user if the user adds new text fields using the "Add" button. Also, I would like to make the form more intuitive by using radio buttons or drop down menu for things like Degree etc.

Build.html:

Website

YOUR PERSONAL INFO



YOUR EDUCATIONAL BACKGROUND

YOUR WORK EXPERIENCE

main_test.js:

function saveFormAsTextFile()

{ /*var textToSave = ' '+ 'First Name: ' + document.getElementById('first_name').value + ' '+ 'Last Name: ' + document.getElementById('last_name').value + ' ' + 'Email: ' + document.getElementById('user_email').value + ' ' + 'Phone Number: ' + document.getElementById('phone_number').value + ' ' + 'Location: ' + document.getElementById('location').value + ' ' + 'LinkedIn: ' + document.getElementById('linkedin').value + ' ' + 'School Name: ' + document.getElementById('school_name').value + ' ';*/

var textToSave = 'First Name, Last Name, Email, Phone Number, Location, LinkedIn, Section Heading, School Name, School Location, Degree, Major, GPA, ' + 'School Start, School End, Section Heading, Company Name, Job Location, Job Title, Job Responsibilites, Work Start, Work End '+

document.getElementById('first_name').value+","+ document.getElementById('last_name').value+","+ document.getElementById('user_email').value+","+ document.getElementById('phone_number').value+","+ document.getElementById('location').value+","+ document.getElementById('linkedin').value+ ","+ document.getElementById('heading1').value+ ","+ document.getElementById('school_name').value+ ","+ document.getElementById('school_location').value+ ","+ document.getElementById('degree').value+ ","+ document.getElementById('major').value+ ","+ document.getElementById('gpa').value+ ","+ document.getElementById('school_start_1').value+ ","+ document.getElementById('school_end_1').value+ "," + document.getElementById('heading2').value+ ","+ document.getElementById('company_name').value+ ","+ document.getElementById('job_location').value+ ","+ document.getElementById('job_title').value+ ","+ document.getElementById('job_responsibilities').value+ ","+ document.getElementById('work_start_1').value+ ","+ document.getElementById('work_end_1').value; /* var textToSaveAsBlob = new Blob([textToSave], {type:"text/plain"}); var textToSaveAsURL = window.URL.createObjectURL(textToSaveAsBlob); var fileNameToSaveAs = document.getElementById("filename").value;

var downloadLink = document.createElement("a"); downloadLink.download = fileNameToSaveAs; downloadLink.innerHTML = "Download File"; downloadLink.href = textToSaveAsURL; downloadLink.onclick = destroyClickedElement; downloadLink.style.display = "none"; document.body.appendChild(downloadLink);

downloadLink.click();*/ //---For CSV var downloadLink = document.createElement('a'); downloadLink.href = 'data:text/csv;charset=utf-8,' + encodeURI(textToSave); downloadLink.target = '_blank'; downloadLink.download = 'resume.csv'; downloadLink.onclick = destroyClickedElement; downloadLink.style.display = "none"; document.body.appendChild(downloadLink); downloadLink.click();

}

function destroyClickedElement(event) { document.body.removeChild(event.target); }

function howitworks_1() {

document.getElementById("demo1").innerHTML = "You will input basic information in the form input fields. We create your resume when you input information such as personal information, educational history, work experience and skills.";

}

function howitworks_2() {

document.getElementById("demo2").innerHTML = "We will process the inputted information. The inputted information will be collected, stored, converted and in turn generate arrays of information which can be transformed into a resume."; }

function howitworks_3() {

document.getElementById("demo3").innerHTML = "Then we let you select a predefined resume template all with different fonts and designs. Then, we will generate a resume based on your defined template and all you to save it as a PDF, or Microsoft Word document."; }

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!