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 a Resume
- Create Account
- Sign in
- Resources
- Talk to us
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
- Build Your Resume
- Create Account
- Sign in
- Resources
- Talk To Us
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.
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