[thelist] JAVASCRIPT: confirmation dialog box that actually works!

DESCHAMPS Stéphane DvSI/SICoR stephane.deschamps at francetelecom.com
Thu Aug 29 11:46:16 CDT 2002


--
> -----Message d'origine-----
> De : thelist-admin at lists.evolt.org
> [mailto:thelist-admin at lists.evolt.org]De la part de Chris W. Parker
>
> hi.
>
> i am creating a small script that as of now immediately
> creates an email
> and sends it. i'd like to add a confirmation box when the
> user press the
> submit button and ask them to verify the important information in the
> form.
>
> typing "javascript confirmation box" in google gives you a lot of
> results, but none of them seemed to work. they all continued to submit
> the form normally even if i clicked cancel. i want the form submission
> to just be canceled.

Chris,
Did you try a simple thing like so:

<form name="yourform" action="otherpage.php" method="post"
onsubmit="if(!confirm('are you sure?')) return false">

I know some people will give you more elaborate scripts, but you said
'simple' ;-)

HTH
s t e f
--
[ winmail.dat was deleted, please don't send attachments with your message. ]
--




More information about the thelist mailing list