...

View Full Version : HTML - Store input data - then displaying on the next html page



jaymainscreen
11-21-2012, 03:53 PM
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:)

niralsoni
11-21-2012, 04:40 PM
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

jaymainscreen
11-22-2012, 03:28 PM
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?





<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>

jaymainscreen
11-23-2012, 03:10 PM
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.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum