Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

148
Vistas
HTML Write to .txt File

I'm making a file in HTML to be run in Edge (just on my computer), and I want to have a string of text be input into an existing .txt file. I'm very new to scripting, and can't get any php's fwrite() or JS' writeFile() to work in Edge. After searching and testing for a few hours, any help you could offer would be awesome!

This is an example I got off another Stack page, but it simply won't run when not commented out.

Thanks!

<!DOCTYPE html>
<html>
<head>
</head>
<script language="Javascript" >

/*function WriteToFile(passForm) { 

    set fso = CreateObject("Scripting.FileSystemObject");  
    set s   = fso.CreateTextFile("filename.txt", True); 
 
    var firstName = document.getElementById('FirstName'); 
    var lastName  = document.getElementById('lastName'); 
 
    s.writeline("First Name :" + FirstName); 
    s.writeline("Last Name :" + lastName); 
 
    s.writeline("-----------------------------"); 
    s.Close(); 
 } */

function tester(){
    alert("This part works");}



</script>

<body>

<button onclick="tester();">Alert Test</button>

<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> 

</body>
</html>
about 4 years ago · Santiago Gelvez
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda