/    Sign up×
Community /Pin to ProfileBookmark

Warning / Confirmation message

Could some one please tell me how to bring up a warning or a confirmation message when the submit button in a form is clicked,
so in basic terms, some one clicks the submit button => confirmation message shows => IF the user clicks OK then proceed ELSE if the user clicks cancel then stop and show the page as it was.

thank you.

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@phpnoviceMar 18.2006 — <form ...etc... onsubmit="return confirm('OK to submit?')">
×

Success!

Help @DOCH 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 6.16,
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: @nearjob,
tipped: article
amount: 1000 SATS,

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

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...