Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

147
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda