Avatar of shampouya
shampouya
 asked on

Why do I love all of my javascript changes once a form is submitted on my webpage?

My webpage below has a changeable background color, but once the form is submitted or once the page is reloaded, it goes back to the default color. Is there a simple way to prevent that in javascript?

my webpage
CSSJavaScript

Avatar of undefined
Last Comment
shampouya

8/22/2022 - Mon
HonorGod

I presume that when you say "love", you mean "save" ;-)
StingRaY

You may save your background color into cookie and load them when the page is loaded.
shampouya

ASKER
Sorry I meant to say why do I lose all my javascript changes. Is there any way to keep the changes once the form on my page is submitted? Does the form being submitted count as a reload of the page?
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
ASKER CERTIFIED SOLUTION
StingRaY

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
shampouya

ASKER
thanks