925
930
function $jsname (form) {
930
936
if (invalid > 0 || alertstr != '') {
933
939
# Check to see if we have our own jserror callback on form failure
935
941
if (my $jse = $self->jserror) {
942
$jsfunc .= " return $jse(form, invalid, alertstr, invalid_fields);\n";
938
944
# Finally, close our JavaScript if it was opened, wrapping in <script> tags
939
945
# We do a regex trick to turn "%s" into "+invalid+"