I want to let a user confirm the submit button, before it is really submitted. What is the suggested way to let a dtml form be confirmed before submit? Something like "file will be changed, are you sure? (Y/N)" Stephan
Stephan Göldi wrote:
I want to let a user confirm the submit button, before it is really submitted. What is the suggested way to let a dtml form be confirmed before submit?
Something like
"file will be changed, are you sure? (Y/N)"
Something Javascript-y? cheers, Chris
On Monday, July 29, 2002, at 03:53 AM, Chris Withers wrote:
Stephan Göldi wrote:
I want to let a user confirm the submit button, before it is really submitted. What is the suggested way to let a dtml form be confirmed before submit? Something like "file will be changed, are you sure? (Y/N)"
Something Javascript-y?
Hi- Find the <FORM> tag in your code. e.g. <FORM ACTION="doStuff" METHOD="POST"> Add an onSubmit handler. e.g. <FORM ACTION="doStuff" METHOD="POST" onSubmit="confirm('Do you *really* want to do that?')"> If the user hits "OK", the form will be submitted. If they hit "Cancel", the browser will not submit the form. Keep in mind that if the user isn't using a JavaScript-compatible browser, they won't see anything. HTH, --Quentin
cheers,
Chris
participants (3)
-
Chris Withers -
Quentin Smith -
Stephan Göldi