What you can do is define your own styling element on the submit widget and match for it in forms-sample-styling.xsl. Ensure the match is of a higher priority than the default match. It works well for us, but I am not sure whether this is the _best_ way of doing such things.
HTH Vica -----Original Message----- From: Mark Lundquist [mailto:[EMAIL PROTECTED] Sent: Saturday, 22 April 2006 9:14 AM To: [EMAIL PROTECTED] Subject: [CForms] decorating onclick handler for submit button? Hi, this seems like it should be simple, sorry if it's a FAQ :-/... I have a submit widget, which as usual is transformed to <input type="submit" onclick="forms_submitForm(this, 'yes'); return false" ... /> Now, suppose we want to attach some typical client-side action as an onclick handler, such as "debouncing" a button against double clicks, or popping up a confirmation dialog. It seems like the best than can be done is to brute-force it, i.e. write my own onclick handler that is CForms-aware (i.e., calls forms_submitForm() to submit the form). But even if I do that, I end up with two onclick attributes in the HTML. At the very least, shouldn't forms-field-styling.xsl not write the onclick attribute if there is already one in the document source? Or am I totally going about this in the wrong way? Thanks, —ml— --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Disclaimer: This email is confidential and may contain privileged information for the sole use of the person or business to which it is addressed. If you are not the intended recipient, please notify the sender by return e-mail or phone as you must not view, disseminate, distribute or copy this email without our consent. We do not accept any liability in connection with any computer virus, data corruption, incompleteness, or unauthorised amendment of this email. It is the sole responsibility of the receiver to scan for viruses before opening. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]