Does anyone know how to combine custom Javascript validation with the built in Coldfusion validation, so the custom Javascript alert is rolled into the same alert box as the CF one? I know CF adds an onsubmit event to the form and creates a _CF_check[‘name of form’] function to do some js validation, but how would I combine the alerts?
Does anyone know how to combine custom Javascript validation with the built in Coldfusion
Share
As mentioned in the comments, you could use the
onValidateattribute to call a custom javascript function. Not quite as elegant as using a cfselect (which you said you cannot use). But it does combine the alerts, and without hacking into the internal functions. If for some reason you cannot use onValidate, then you probably will have to dig into the internals.Note: The signature of your javascript function must be: