The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> HTML - how to save "input" to load later on?
OoDex
post 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)wink.gif

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?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Oct 2 2017, 10:54 AM
Post #2


.
********

Group: WDG Moderators
Posts: 7,736
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.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
jokerrules
post 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?)
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Oct 25 2017, 04:35 AM
Post #4


.
********

Group: WDG Moderators
Posts: 7,736
Joined: 10-August 06
Member No.: 7



QUOTE(jokerrules @ Oct 4 2017, 11:31 AM) *

(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." smile.gif

See also https://en.wikipedia.org/wiki/Progressive_enhancement



User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 12th December 2017 - 04:54 PM