Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Nov 2012
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts

    HTML - Store input data - then displaying on the next html page

    Hi,

    I am trying to create input text forms, where user enters some information. I want it to store this information(On local machine) then display this same information on the next page


    So on index html,

    <html>
    <form>
    Username: <input type="text" name="user">
    <input type="submit" value="Submit">
    </form>
    </html>


    However I am trying to display the inputted information on the next html page.

    What is the best way to go about this?

    Many thanks

  • #2
    Regular Coder
    Join Date
    Mar 2008
    Location
    London
    Posts
    152
    Thanks
    4
    Thanked 42 Times in 42 Posts
    Try using the localStorage to store information locally within the browser. Refer to below given link for more details.http://www.jstorage.info/

    Regards,
    Niral Soni

  • Users who have thanked niralsoni for this post:

    jaymainscreen (11-23-2012)

  • #3
    New to the CF scene
    Join Date
    Nov 2012
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Thank you Niral for your solution,

    I have installed Jquery, Jstorage and JSON2.
    I have attempted at the form, but I am not sure how to use JStorage, so it stores the username. Then display that value on the next page. So if a new page is loaded, can the username still be retrieved?




    Code:
    <form id="loginForm" name="loginForm" method="POST">
    <label>
    <span>Username:</span>
    <input type="text" id="username" name="username" placeholder="Enter Username" required>
    </label>
    <button type="submit" id="loginButton" name="loginButton">Log In</button>
    
    </form>

  • #4
    New to the CF scene
    Join Date
    Nov 2012
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts
    After lot of searching, I have found a solution to the problem.

    Concatenate the desired variables onto the URL, then strip those values into the next page.


  •  

    Tags for this Thread

    Posting Permissions

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