apache > cocoon

- Home

# My form contains references to javascript functions that are not defined, how do I fix this?

##

When you publish a CForm through the default CForms XSLs, you'll notice that it contains references to javascript functions such as `<body onload="forms_onload();">`.

If these don't work, because the scripts are not defined using `<script>` in the HTML page, then this is likely because the input you supply to the CForms XSLs is missing a `<head>` element. The CForm XSLs will add the script (and CSS) references when they encounter a `<head>` element.

Errors and Improvements? If you see any errors or potential improvements in this document please help us: View, Edit or comment on the latest development version (registration required).