In this case, will the text sent to two files at once?

 <form method="post" action="file1.htm"> <form method="post" action="file2.htm"> <input type="text" id="text" value="12345"> <input type="submit" value="Отправить"> </form> </form> 
  • Possible duplicate question: Submitting the form - ߊߚߤߘ
  • Not. In that question I asked about possible options, is it possible to do this in general? And here I tried to do so, and asked if it could be done. And in general, to be honest, I don’t remember, half a year has passed .. - nick
  • You can do so . - Roman Grinyov
  • Exactly. But still, my question cannot be called a duplicate, as @Arhad said. - nick

1 answer 1

It is impossible, because the form method="post" , and there is a transition to the link specified in action="" . And during the transition, all functions specified after the code document.getElementById("form").submit() are not read. This operation would be possible in method="get" , because switching to another page does not occur, and all codes are read.

  • 2
    @ Nikita ___, Try to write more detailed answers. Explain what your statement is based on. - Nicolas Chabanovsky
  • one
    Now a detailed answer to my question, you can say, is there: ru.stackoverflow.com/a/535804/201026 - nick