Question: Help needed with making this code work. Ideally, it should save the answers from the form to a text time specified by the user. I

Help needed with making this code work. Ideally, it should save the answers from the form to a text time specified by the user. I am having problems doing that. Pressing the Make button after filling out the form does nothing. It would be nice if you can fix the code and make it save the answers inputted from form to the text file with name specified by the user. I am attaching below the required files needed to do this.

Build.html:

Resumaker

Build your resume here!

YOUR PERSONAL INFO



Main.js:

function saveFormAsTextFile() { alert('Hey'); 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 + ' ';

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(); }

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

Main HTML file if needed: Test.html

Resumaker

What we do?

1. We create your resume when you input information such as personal information, educational history, work experience and skills.

2. The inputted information will be collected, stored, converted and in turn generate arrays of information which can be transformed into a resume.

3. Then we let you select a predefined resume template all with different fonts and designs, to generate a resume.

4. After all that is done, we allow you to be able to download generated resume as a PDF, Google or Microsoft Word document.

  • Build a resume
  • Create Account
  • Sign in
  • Resources
  • Contact us
  • 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!