[thelist] JAVASCRIPT: confirmation dialog box that actually works!
James Aylard
evolt at pixelwright.com
Thu Aug 29 13:04:01 CDT 2002
Ken,
> <input type="submit" name="formSubmit"
> id="formSubmit" value="Submit Form"
> onClick="if (!confirm('really submit?')) return false;">
One big loophole with this approach in IE, however, is that if the form
contains no more than one text field (but can include other field types) and
the user submits the form by hitting the enter key rather than by clicking
the submit button, the onclick event is never fired. Since this approach is
therefore unreliable, I would recommend using the form's onsubmit event
handler instead.
James Aylard
More information about the thelist
mailing list