www.webdeveloper.com
Results 1 to 5 of 5

Thread: pass data using post between html pages

Hybrid View

  1. #1
    Join Date
    Dec 2010
    Posts
    40

    pass data using post between html pages

    Hi,
    I want to pass values between 2 html pages using POST method. I have lot of data to be passed to 2nd page and cannot use GET. My issue is I dont know how to pass values to second html page and how do i display username on page 2.
    pls help.

    page1.html
    [CODE]
    <html>
    <head>
    <title>Form</title>
    </head>
    <body>
    <h4>Enter your name</h4>
    <form name="form1" method="post" action="page2.html">
    <input type="text" name="username">
    <input type="submit" onclick="submitForm()">
    </form>
    <script type="text/javascript">
    function submitForm()
    {
    form1.submit();
    }
    </script>
    </body>
    </html>

    page2.html

    <html>
    <head>
    </head>
    <body>
    ....... dont know how to display username entered on page1.html here...
    </body>
    </html>

    [CODE]

  2. #2
    Join Date
    Dec 2012
    Location
    Prague, Czech Republic
    Posts
    7
    You need a server side language like PHP or you can also use JavaScript, check this out: http://www.boutell.com/newfaq/creating/scriptpass.html

  3. #3
    Join Date
    Dec 2010
    Posts
    40
    If in introduce aspx , I can read post values in code but can I still pass load HTML from aspx code behind and pass these values to HTML ?

  4. #4
    Join Date
    Dec 2012
    Location
    Prague, Czech Republic
    Posts
    7
    Yes you can also do it with aspx - its a server side language.

  5. #5
    Join Date
    Jul 2008
    Location
    urbana, il
    Posts
    2,787
    you can spit your data into form inputs on the server, and read those inputs on the client.
    you could also tuck everything into a JSONp bundle in a <script> tag.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles