HTML - how to save "input" to load later on? |
HTML - how to save "input" to load later on? |
OoDex |
Oct 2 2017, 06:10 AM
Post
#1
|
Group: Members Posts: 1 Joined: 2-October 17 Member No.: 26,508 |
Hello all,
I have no clue of HTML, but at least so far I wrote some forms/labels,inputs and a show-button...my problem is: I want a homepage where people write something in the input-box and I can call the value of the input-box. Now first I wanted to keep it on the same page, I just hide all the forms and show a div. But the variables I call for don't update (or document.write(var) doesn't work in Chrome), so they just show nothing, obviously. (it works with alert(var) Is there any way to either update the div later on, that the variables are shown, or to somehow get where I want to be? |
Christian J |
Oct 2 2017, 10:54 AM
Post
#2
|
. Group: WDG Moderators Posts: 9,656 Joined: 10-August 06 Member No.: 7 |
document.write only runs when the page is loaded. Also it's javascript, which means the data disappears once the user leaves the page. If you're OK with the latter you might use e.g. innerHTML instead of document.write, but if you want to store the data for the future you need a server side script like PHP.
|
jokerrules |
Oct 4 2017, 04:31 AM
Post
#3
|
Newbie Group: Members Posts: 18 Joined: 30-August 17 Member No.: 26,486 |
QUOTE doesn't work in Chrome I run into that problem quite a lot. Maybe try Firefox? (On that note, be curious to hear which browser our resident experts here use?) |
Christian J |
Oct 25 2017, 04:35 AM
Post
#4
|
. Group: WDG Moderators Posts: 9,656 Joined: 10-August 06 Member No.: 7 |
(On that note, be curious to hear which browser our resident experts here use?) When making sites: all of those that are currently in use and that I have access to. When browsing the web: it varies. "The Web Design Group was founded to promote the creation of non-browser specific, non-resolution specific, creative and informative sites that are accessible to all users worldwide." See also https://en.wikipedia.org/wiki/Progressive_enhancement |
Lo-Fi Version | Time is now: 24th April 2024 - 06:04 AM |