0

I am sending POST form data to Page 2 from Page 1.

Page_1.html

<head>

    <script type="text/javascript">

        function sendForm()
        {
            document.forms["form1"].submit();
        }

    </script>

</head>

<body>

    <form action="Page_2.html" method="POST" name="form1">

        <input type="hidden" name="t1" value="123">
        <br>
        <input type="button" onClick="sendForm()" id="t2">

    </form>

</body>

Now, how can I retrieve the value of the text "t1" in the Page_2.html?

Pankaj Dwivedi
  • 379
  • 1
  • 6
  • 16
  • 3
    Are you using any server side languages? – Leeish Oct 07 '14 at 17:04
  • No, data is being sent from one HTML to another. – Pankaj Dwivedi Oct 07 '14 at 17:06
  • 1
    that isn't possible - you have to use GET. – Daniel A. White Oct 07 '14 at 17:07
  • The answer to this question clarifies it for you. http://stackoverflow.com/questions/10896854/simple-html-post-without-any-server-scripting-can-be-done-using-js If you are not using a server side language you'll need to use GET and javascript. I don't believe you can read header data without a server side scripting language. – Leeish Oct 07 '14 at 17:07

0 Answers0