For Adobe ColdFusion application servers Common questions

submit() not defined when submitting a form using JavaScript

You can use JavaScript to submit a form when any arbitrary action occurs , such as clicking a checkbox or link. On an HTML form element or a TerraField, add an attribute like this: onclick="submit()" or this: onclick="document.[myForm].submit()". Developers often give the submit button in their form the name, "submit". If this is done, then the form's submit() method will become overwritten and no longer available. You may receive an error, "submit is not a function" or "Object doesn't support this property or method". It is good practice to never call the submit button on your form "submit".

Using cfinsert

If you use the cfinsert tag to insert data from your form into your database, you may see an error like this:

The given fieldname "myField" could not be found in the table "myTable".

You must be sure to provide a list of form fields using the cfinsert formfields attribute. Without this attribute, ColdFusion attempts to insert every form field. This fails as TerraForm creates a few form fields of its own to do work behind the scenes.

HyperText Markup Language
The coding language used to create hypertext documents for use on the World Wide Web.
No comments yet