/    Sign up×
Community /Pin to ProfileBookmark

Basic cookie

I am a beginning web designer, and i am very confident in html and css, but i can’t get a good handle on javascript. i’m making a comment function where people enter info into a form and click a submit button. the button runs a php page which sends me an email and redirects them back to the original page. The question i have is, when they are redirected back to the original page, how can I put “Message sent” where the form was?

basically, i want a cookie or something that will be gone in 30 seconds. I know that the submit button will need an onClick function to create the cookie, but that’s as far as i know. help is appreciated!

Drew Vosburg

[url]www.drewvosburg.com[/url]

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@bathurst_guyFeb 17.2008 — better off doing it with PHP once it checks the form and checks that the email sent.
Copy linkTweet thisAlerts:
@VozzieauthorFeb 17.2008 — The thing is, i didn't put the php into the html file. How would i do that? i'm referencing a php file by the action in my form, and idk how i would reference it if it's in the same file.
×

Success!

Help @Vozzie spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.20,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...