Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

208
Views
I need help writing data from a html form to a text file in JavaScript

I Know someone has already answered this question, but for some reason it might have been deleted or removed because I can seem to find it anymore, thanks for any help provided strong text

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

function WriteToFile(passForm) {
    set fso = CreateObject("Scripting.FileSystemObject");     
    set s   = fso.CreateTextFile("<your Path>/filename.txt", True);
    var firstName = document.getElementById('FirstName');
    var lastName  = document.getElementById('lastName');
    s.writeline("First Name :" + FirstName);
    s.writeline("Last Name :" + lastName); 
    s.Close();
 }

<form onSubmit="WriteToFile(this)">
<label>Type your first name:</label>
<input type="text" name="FirstName" id="firstName" size="20">
 
<label>Type your last name: </abel>
<input type="text" name="LastName" id="lastName" size="20">
 
<input type="submit" value="submit">
</form>
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!